diff --git a/Docs/.project b/Docs/.project new file mode 100644 index 0000000000000000000000000000000000000000..3ba028eb1a179feb0f6d3c1351615b1b3b4ddb68 --- /dev/null +++ b/Docs/.project @@ -0,0 +1,11 @@ + + + Docs + + + + + + + + diff --git a/Docs/475_A_ProgRep.doc b/Docs/475_A_ProgRep.doc new file mode 100644 index 0000000000000000000000000000000000000000..4382335960eb11cfd47e5a1dbba3ab31a3509f47 Binary files /dev/null and b/Docs/475_A_ProgRep.doc differ diff --git a/Docs/475_B_ProgRep.doc b/Docs/475_B_ProgRep.doc new file mode 100644 index 0000000000000000000000000000000000000000..463b765d60937c7ddbbe9e06bf6565a36dfcc968 Binary files /dev/null and b/Docs/475_B_ProgRep.doc differ diff --git a/Docs/475_C_FinRep.doc b/Docs/475_C_FinRep.doc new file mode 100644 index 0000000000000000000000000000000000000000..367b5c9cd74c09b3c00ca4bffdb4d277c27d5274 Binary files /dev/null and b/Docs/475_C_FinRep.doc differ diff --git a/Docs/MTS62/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.1.doc b/Docs/MTS62/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.1.doc new file mode 100755 index 0000000000000000000000000000000000000000..a16d6cc3722f9167de4b993c0774b3bf2b3f16f0 Binary files /dev/null and b/Docs/MTS62/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.1.doc differ diff --git a/Docs/MTS62/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.1.doc b/Docs/MTS62/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.1.doc new file mode 100755 index 0000000000000000000000000000000000000000..29970ecd9fe5d2d2bef0b61299456def7c0d9ed5 Binary files /dev/null and b/Docs/MTS62/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.1.doc differ diff --git a/Docs/MTS62/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.1.doc b/Docs/MTS62/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.1.doc new file mode 100755 index 0000000000000000000000000000000000000000..6be534263afff4662ce2353f550a0dfa804a3520 Binary files /dev/null and b/Docs/MTS62/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.1.doc differ diff --git a/Docs/MTS63/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.2.doc b/Docs/MTS63/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.2.doc new file mode 100755 index 0000000000000000000000000000000000000000..56aec966d3400d0c2fdb1026df5cb96fbb9d51f5 Binary files /dev/null and b/Docs/MTS63/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.2.doc differ diff --git a/Docs/MTS63/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.2.doc b/Docs/MTS63/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.2.doc new file mode 100755 index 0000000000000000000000000000000000000000..6357c3470384ab24c5e46c9edb343f44c7359533 Binary files /dev/null and b/Docs/MTS63/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.2.doc differ diff --git a/Docs/MTS63/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.2.doc b/Docs/MTS63/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.2.doc new file mode 100755 index 0000000000000000000000000000000000000000..3e20712c81efa9a9ab06dbd33e54cf3981aa9712 Binary files /dev/null and b/Docs/MTS63/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.2.doc differ diff --git a/Docs/MTS64/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.3.doc b/Docs/MTS64/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.3.doc new file mode 100644 index 0000000000000000000000000000000000000000..b981027945f13368592987f5f715dd39ac78cd47 Binary files /dev/null and b/Docs/MTS64/MTS-103253-ed111-TtcnXmlConf_ICS-v0.0.3.doc differ diff --git a/Docs/MTS64/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.3.doc b/Docs/MTS64/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.3.doc new file mode 100644 index 0000000000000000000000000000000000000000..a6d56665df76a5a35984b3548c8353698be250f3 Binary files /dev/null and b/Docs/MTS64/MTS-103254-ed111-TtcnXmlConf_TPs-v0.0.3.doc differ diff --git a/Docs/MTS64/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.3.doc b/Docs/MTS64/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.3.doc new file mode 100644 index 0000000000000000000000000000000000000000..7c4cd0a17f2763a10e5de595eb0ef01fce13079a Binary files /dev/null and b/Docs/MTS64/MTS-103255-ed111-TtcnXmlConf_ATS-v0.0.3.doc differ diff --git a/Docs/MTS65/MTS-103253-ed121-TtcnXmlConf_ICS-v0_0_1.doc b/Docs/MTS65/MTS-103253-ed121-TtcnXmlConf_ICS-v0_0_1.doc new file mode 100644 index 0000000000000000000000000000000000000000..32925ec8bf33950d008a306a43764cbcdc9d83f8 Binary files /dev/null and b/Docs/MTS65/MTS-103253-ed121-TtcnXmlConf_ICS-v0_0_1.doc differ diff --git a/Docs/MTS65/MTS-103254-ed121-TtcnXmlConf_TPs-v0_0_1.doc b/Docs/MTS65/MTS-103254-ed121-TtcnXmlConf_TPs-v0_0_1.doc new file mode 100644 index 0000000000000000000000000000000000000000..0da534b462c434bc3f1192f2b7ada8493971bb2c Binary files /dev/null and b/Docs/MTS65/MTS-103254-ed121-TtcnXmlConf_TPs-v0_0_1.doc differ diff --git a/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1.doc b/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1.doc new file mode 100644 index 0000000000000000000000000000000000000000..903233690147712ba994146b0c305a08c556d0f3 Binary files /dev/null and b/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1.doc differ diff --git a/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1_ats.zip b/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1_ats.zip new file mode 100644 index 0000000000000000000000000000000000000000..5eea65b939d520e3aa2ef4667a42c8a98354fba6 Binary files /dev/null and b/Docs/MTS65/MTS-103255-ed121-TtcnXmlConf_ATS-v0_0_1_ats.zip differ diff --git a/Docs/Templates_ConformanceSTF470/part1-ics/MTS-00132-1ed131-T3Conf_ICS-v0.0.3.doc b/Docs/Templates_ConformanceSTF470/part1-ics/MTS-00132-1ed131-T3Conf_ICS-v0.0.3.doc new file mode 100644 index 0000000000000000000000000000000000000000..0b21dd286ce0b8577ccfc1bbd4984b1b6998f2d9 Binary files /dev/null and b/Docs/Templates_ConformanceSTF470/part1-ics/MTS-00132-1ed131-T3Conf_ICS-v0.0.3.doc differ diff --git a/Docs/Templates_ConformanceSTF470/part2-tss_and_tps/MTS-00132-2ed131-T3Conf_TPs-v0.0.2.doc b/Docs/Templates_ConformanceSTF470/part2-tss_and_tps/MTS-00132-2ed131-T3Conf_TPs-v0.0.2.doc new file mode 100644 index 0000000000000000000000000000000000000000..f4b3a6576cd679af47574db8e3890f6b8647bd11 Binary files /dev/null and b/Docs/Templates_ConformanceSTF470/part2-tss_and_tps/MTS-00132-2ed131-T3Conf_TPs-v0.0.2.doc differ diff --git a/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3.doc b/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3.doc new file mode 100644 index 0000000000000000000000000000000000000000..93a223914ce3f0b751b6c1f56795a340913246c3 Binary files /dev/null and b/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3.doc differ diff --git a/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3_ats.zip b/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3_ats.zip new file mode 100644 index 0000000000000000000000000000000000000000..c1af706c4de5485ed628778b635d111825a883ad Binary files /dev/null and b/Docs/Templates_ConformanceSTF470/part3-ats_and_ixit/MTS-00132-3ed131-T3Conf_ATS-v0.0.3_ats.zip differ diff --git a/Docs/deliverable/ATSSTF475_Sept2014.zip b/Docs/deliverable/ATSSTF475_Sept2014.zip new file mode 100644 index 0000000000000000000000000000000000000000..e61e15b3aec382f71f9fd560fd22b579ec40d9aa Binary files /dev/null and b/Docs/deliverable/ATSSTF475_Sept2014.zip differ diff --git a/Docs/deliverable/stf475-ics.html b/Docs/deliverable/stf475-ics.html new file mode 100644 index 0000000000000000000000000000000000000000..cfa005f32daa687e12ba07714b4421a5de8929ce --- /dev/null +++ b/Docs/deliverable/stf475-ics.html @@ -0,0 +1,37321 @@ + + + + + + + + + + + + + + + + + + +
+ +

A.3.2 Mapping XML Schemas

+ +

Table A.1: Mapping XML Schemas

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_05_top_level_001

+
+

Verify that error is generated for missing XSD language tag in import clause

+
+

Clause 5

+
+

m

+
+

 

+
+ +
+ +

 

+ +
+

A.3.3 Namespaces

+ +

Table A.2: Namespaces

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_050101_namespaces_001

+
+

Verify that schema with target namespace is correctly translated into single module

+
+

Clause 5.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_050101_namespaces_002

+
+

Verify schema with no target namespace is correctly translated into single module

+
+

Clause 5.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_050101_namespaces_003

+
+

Verify that two schemas with the same target namespace are correctly translated

+
+

Clause 5.1.1

+
+

m

+
+

 

+
+

4

+
+

Pos_050101_namespaces_004

+
+

Verify that two schemas with no target namespace are correctly translated

+
+

Clause 5.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.4 Includes

+ +

Table A.3: Includes

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_050102_includes_001

+
+

Test inclusion of a schema with the same namespace

+
+

Clause 5.1.2

+
+

m

+
+

 

+
+

2

+
+

Pos_050102_includes_002

+
+

Verify that included schema with no target namespace is transformed twice (inclusion)

+
+

Clause 5.1.2

+
+

m

+
+

 

+
+

3

+
+

Pos_050102_includes_003

+
+

Verify that included schema with no target namespace is transformed twice (no namespace)

+
+

Clause 5.1.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.5 Imports

+ +

Table A.4: Imports

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_050103_imports_001

+
+

Verify that it is not allowed to import imports from XSD schemas

+
+

Clause 5.1.3

+
+

m

+
+

 

+
+

2

+
+

Pos_050103_imports_001

+
+

Verify that XSD import statement is handled correctly

+
+

Clause 5.1.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.6 Attributes of the XSD schema element

+ +

Table A.5: Attributes of the XSD schema element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_050104_attributes_of_the_xsd_schema_element_001

+
+

Verify that qualified default element form is correctly processed (no namespace prefix)

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+

2

+
+

Pos_050104_attributes_of_the_xsd_schema_element_002

+
+

Verify that qualified default element form is correctly processed (namespace prefix used)

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+

3

+
+

Pos_050104_attributes_of_the_xsd_schema_element_003

+
+

Verify that unqualified default element form is correctly processed

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+

4

+
+

Pos_050104_attributes_of_the_xsd_schema_element_004

+
+

Verify that qualified default attribute form is correctly processed (no namespace prefix)

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+

5

+
+

Pos_050104_attributes_of_the_xsd_schema_element_005

+
+

Verify that qualified default attribute form is correctly processed (namespace prefix used)

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+

6

+
+

Pos_050104_attributes_of_the_xsd_schema_element_006

+
+

Verify that unqualified default attribute form is correctly processed

+
+

Clause 5.1.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.7 Name conversion rules

+ +

Table A.6: Name conversion rules

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_050202_name_conversion_rules_001

+
+

Verify conversion of symbols into U+005f (low line)

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

2

+
+

Pos_050202_name_conversion_rules_002

+
+

Verify that non-ASCI letters are not present in transforming identifiers

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

3

+
+

Pos_050202_name_conversion_rules_003

+
+

TODO: add description

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

4

+
+

Pos_050202_name_conversion_rules_004

+
+

Verify that leading and trailing low lines are removed

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

5

+
+

Pos_050202_name_conversion_rules_005

+
+

Verify that type names are capitalized

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

6

+
+

Pos_050202_name_conversion_rules_006

+
+

Verify that prefixing type names with "X" works correctly

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

7

+
+

Pos_050202_name_conversion_rules_007

+
+

Verify that names of field of structure types are uncapitalized

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

8

+
+

Pos_050202_name_conversion_rules_008

+
+

Verify that names of enumerated items are uncapitalized

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

9

+
+

Pos_050202_name_conversion_rules_009

+
+

Verify that prefixing field names of structured types with "x" works correctly

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

10

+
+

Pos_050202_name_conversion_rules_010

+
+

Verify that prefixing enumerated items with "x" works correctly

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

11

+
+

Pos_050202_name_conversion_rules_011

+
+

Check transformation of empty type identifier into "X"

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

12

+
+

Pos_050202_name_conversion_rules_012

+
+

Check transformation of empty structured field identifier into "x"

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

13

+
+

Pos_050202_name_conversion_rules_013

+
+

Check transformation of empty enumerated value into "x"

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

14

+
+

Pos_050202_name_conversion_rules_014

+
+

Verify that additional suffices are attached in case of name clashes between types

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

15

+
+

Pos_050202_name_conversion_rules_015

+
+

Verify that suffix is attached in case of name clash between types and local module

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

16

+
+

Pos_050202_name_conversion_rules_016

+
+

Verify that suffix is attached in case of name clash between types and imported module

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

17

+
+

Pos_050202_name_conversion_rules_017

+
+

Verify that suffix is attached in case of name clash between field names

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

18

+
+

Pos_050202_name_conversion_rules_018

+
+

Verify that suffix is attached in case of name clash between field name and keyword

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

19

+
+

Pos_050202_name_conversion_rules_019

+
+

Verify that suffix is attached in case of name clash between field name and predefined function

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

20

+
+

Pos_050202_name_conversion_rules_020

+
+

Verify that suffix is attached in case of name clash between enumerated items

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

21

+
+

Pos_050202_name_conversion_rules_021

+
+

Verify that suffix is attached in case of name clash between enumerated item and keyword

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

22

+
+

Pos_050202_name_conversion_rules_022

+
+

Verify that suffix is attached in case of name clash between enumerated item and predefined function

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

23

+
+

Pos_050202_name_conversion_rules_023

+
+

Verify that name clash between module names is resolved using suffix

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.8 Order of the mapping

+ +

Table A.7: Order of the mapping

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_050203_order_of_the_mapping_001

+
+

Verify order of top-level schema components

+
+

Clause 5.2.3

+
+

m

+
+

 

+
+

2

+
+

Pos_050203_order_of_the_mapping_002

+
+

Verify that alphabetical sorting is based on character ordinal numbers

+
+

Clause 5.2.3

+
+

m

+
+

 

+
+

3

+
+

Pos_050203_order_of_the_mapping_003

+
+

Verify that alphabetical sorting is done only inside sets of items

+
+

Clause 5.2.3

+
+

m

+
+

 

+
+

4

+
+

Pos_050203_order_of_the_mapping_004

+
+

Asure that namespaces are ordered lexically

+
+

Clause 5.2.3

+
+

m

+
+

 

+
+

5

+
+

Pos_050203_order_of_the_mapping_005

+
+

Asure that namespaces are ordered lexically

+
+

Clause 5.2.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.9 Built-in data types

+ +

Table A.8: Built-in data types

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_06_top_level_001

+
+

Verify conversion of simpleType based on built-in XSD type

+
+

Clause 6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.10 Length

+ +

Table A.9: Length

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060101_length_001

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+
+

Clause 6.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_060101_length_001

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+
+

Clause 6.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_060101_length_002

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+
+

Clause 6.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.11 Enumeration

+ +

Table A.10: Enumeration

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD + + + + + + + + +<<<<<<< HEAD +======= +>>>>>>> generated ICS TP TSS +======= + + + + + + + + +>>>>>>> update +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060105_enumeration_001

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

2

+
+

Neg_060105_enumeration_002

+
+

Verify if tool rejects validation in case of restricted enumerated value length due xsd type declaration.

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

3

+
+

Neg_060105_enumeration_003

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

4

+
+

Neg_060105_enumeration_004

+======= +======= + lang=EN-GB>Neg_060105_enumeration_004

+
+

disallow enumeration values removed by restriction

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

5

+
+

>>>>>> update + lang=EN-GB>Pos_060105_enumeration_001

+>>>>>>> generated ICS TP TSS +
+

disallow enumeration values removed by restriction

+======= + lang=EN-GB>Verify mapping of simple type definition that is a restriction of

+>>>>>>> generated ICS TP TSS +
+

Clause 6.1.5

+
+

m

+
+

 

+
+

6

+
+

Pos_060105_enumeration_001

+======= + lang=EN-GB>Pos_060105_enumeration_002

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of simple type definition that is a restriction of

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

7

+
+

Pos_060105_enumeration_002

+======= + lang=EN-GB>Pos_060105_enumeration_003

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of simple type definition that is a restriction of

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

8

+
+

Pos_060105_enumeration_003

+======= + lang=EN-GB>Pos_060105_enumeration_004

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of simple type definition that is a restriction of

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

9

+
+

Pos_060105_enumeration_004

+======= + lang=EN-GB>Pos_060105_enumeration_005

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of simple type definition that is a restriction of

+======= + lang=EN-GB>Verify mapping of simple type definition that is a restriction of another

+>>>>>>> generated ICS TP TSS +
+

Clause 6.1.5

+<<<<<<< HEAD +
+

m

+
+

 

+
+

9

+
+

Pos_060105_enumeration_005

+
+

Verify mapping of simple type definition that is a restriction of another

+
+

Clause 6.1.5

+======= +>>>>>>> generated ICS TP TSS +
+

m

+
+

 

+
+

10

+
+

Pos_060105_enumeration_006

+
+

TODO write purpose

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+

10

+
+

Pos_060105_enumeration_006

+
+

TODO write purpose

+
+

Clause 6.1.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.12 MinInclusive

+ +

Table A.11: MinInclusive

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060107_mininclusive_001

+
+

Verify mapping of an integer element with a minInclusive facet

+
+

Clause 6.1.7

+
+

m

+
+

 

+
+

2

+
+

Pos_060107_mininclusive_002

+
+

Verify mapping of a float element with a numeric minInclusive value

+
+

Clause 6.1.7

+
+

m

+
+

 

+
+

3

+
+

Pos_060107_mininclusive_003

+
+

Verify mapping of a float element with special minInclusive values

+
+

Clause 6.1.7

+
+

m

+
+

 

+
+

4

+
+

Pos_060107_mininclusive_004

+
+

Verify mapping of a float element with special minInclusive values

+
+

Clause 6.1.7

+
+

m

+
+

 

+
+

5

+
+

Pos_060107_mininclusive_005

+
+

Verify mapping of a float element with special minInclusive values

+
+

Clause 6.1.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.13 MaxInclusive

+ +

Table A.12: MaxInclusive

+ +
+ + + + + + + + + + + + + + + + + + +<<<<<<< HEAD + + + + + + + + + + + + + + + + +======= +>>>>>>> generated ICS TP TSS + + + + + + + + +<<<<<<< HEAD +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060108_maxinclusive_001

+
+

Verify mapping of elements of type integer with maxInclusive facet

+
+

Clause 6.1.8

+
+

m

+
+

 

+
+

2

+
+

Pos_060108_maxinclusive_002

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Clause 6.1.8

+
+

m

+
+

 

+
+

3

+
+

Pos_060108_maxinclusive_003

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Clause 6.1.8

+
+

m

+
+

 

+
+<<<<<<< HEAD +

4

+======= +

2

+>>>>>>> generated ICS TP TSS +
+

Pos_060108_maxinclusive_004

+======= + lang=EN-GB>Pos_060108_maxinclusive_002

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Clause 6.1.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.14 MinExclusive

+ +

Table A.13: MinExclusive

+ +
+ + + +======= + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + +<<<<<<< HEAD +======= +
+

3

+
+

Pos_060108_maxinclusive_003

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Clause 6.1.8

+
+

m

+
+

 

+
+

4

+
+

Neg_060109_minexclusive_001

+======= + lang=EN-GB>Pos_060108_maxinclusive_004

+>>>>>>> generated ICS TP TSS +
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+======= + lang=EN-GB>Verify mapping of a float type with a numeric maxInclusive facet

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Clause 6.1.9

+======= +

Clause 6.1.8

+>>>>>>> generated ICS TP TSS +
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.14 MinExclusive

+ +

Table A.13: MinExclusive

+ +
+ + + + + + + + + + +>>>>>>> generated ICS TP TSS + + + + + + + + +<<<<<<< HEAD + + + + + + + + +======= +>>>>>>> generated ICS TP TSS + + + + + + + + +<<<<<<< HEAD +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

2

+
+

Neg_060109_minexclusive_002

+======= + lang=EN-GB>Neg_060109_minexclusive_001

+>>>>>>> generated ICS TP TSS +
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Clause 6.1.9

+
+

m

+
+

 

+
+

3

+
+

Pos_060109_minexclusive_001

+
+

Verify if tool accepts values restricted by xsd type declaration.

+
+

Clause 6.1.9

+
+

m

+
+

 

+
+<<<<<<< HEAD +

4

+======= +

2

+>>>>>>> generated ICS TP TSS +
+

Pos_060109_minexclusive_002

+======= + lang=EN-GB>Neg_060109_minexclusive_002

+>>>>>>> generated ICS TP TSS +
+

Verify if tool accepts values restricted by xsd type declaration.

+======= + lang=EN-GB>Verify if tool rejects validation in case of restricted value due xsd type declaration.

+>>>>>>> generated ICS TP TSS +
+

Clause 6.1.9

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.15 MaxExclusive

+ +

Table A.14: MaxExclusive

+ +
+ + + +======= + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + +<<<<<<< HEAD + +======= +
+

3

+
+

Pos_060109_minexclusive_001

+
+

Verify if tool accepts values restricted by xsd type declaration.

+
+

Clause 6.1.9

+
+

m

+
+

 

+
+

4

+
+

Neg_060110_maxexclusive_001

+======= + lang=EN-GB>Pos_060109_minexclusive_002

+>>>>>>> generated ICS TP TSS +
+

Verify that INF (negative infinity) or NaN (not-a-number), this type shall not be translated to TTCN-3

+======= + lang=EN-GB>Verify if tool accepts values restricted by xsd type declaration.

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Clause 6.1.10

+======= +

Clause 6.1.9

+>>>>>>> generated ICS TP TSS +
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.15 MaxExclusive

+ +

Table A.14: MaxExclusive

+ +
+ + + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD +
+

2

+
+

Pos_060110_maxexclusive_001

+
+

Verify mapping of a maxExclusive facet applied to a type, which is derivative of integer

+
+

Clause 6.1.10

+
+

m

+
+

 

+
+

3

+
+

Pos_060110_maxexclusive_002

+
+

Verify mapping of a maxExclusive facet applied to the float type

+
+

Clause 6.1.10

+
+

m

+
+

 

+
+

4

+
+

Pos_060110_maxexclusive_003

+======= + lang=EN-GB>Neg_060110_maxexclusive_001

+>>>>>>> generated ICS TP TSS +
+

Verify mapping of a maxExclusive facet applied to the float type

+======= + lang=EN-GB>Verify that INF (negative infinity) or NaN (not-a-number), this type shall not be translated to TTCN-3

+>>>>>>> generated ICS TP TSS +
+

Clause 6.1.10

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.16 Total digits

+ +

Table A.15: Total digits

+ +
+ + + +======= + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

2

+
+

Pos_060110_maxexclusive_001

+
+

Verify mapping of a maxExclusive facet applied to a type, which is derivative of integer

+
+

Clause 6.1.10

+
+

m

+
+

 

+
+

3

+
+

Pos_060110_maxexclusive_002

+
+

Verify mapping of a maxExclusive facet applied to the float type

+
+

Clause 6.1.10

+
+

m

+
+

 

+
+

4

+
+

Neg_060111_total_digits_001

+======= + lang=EN-GB>Pos_060110_maxexclusive_003

+>>>>>>> generated ICS TP TSS +
+

Check that totalDigits are converted to value boundaries

+======= + lang=EN-GB>Verify mapping of a maxExclusive facet applied to the float type

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Clause 6.1.11

+======= +

Clause 6.1.10

+>>>>>>> generated ICS TP TSS +
+

m

+
+

 

+
+

2

+
+

Neg_060111_total_digits_002

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

3

+
+

Neg_060111_total_digits_003

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

4

+
+

Neg_060111_total_digits_004

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

5

+
+

Pos_060111_total_digits_001

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

6

+
+

Pos_060111_total_digits_002

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

7

+
+

Pos_060111_total_digits_003

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

8

+
+

Pos_060111_total_digits_004

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

9

+
+

Pos_060111_total_digits_005

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.17 Fraction digits

+ +

Table A.16: Fraction digits

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060112_fraction_digits_001

+
+

TODO write purpose

+
+

Clause 6.1.12

+
+

m

+
+

 

+
+

2

+
+

Pos_060112_fraction_digits_002

+
+

TODO write purpose

+
+

Clause 6.1.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.18 Not specifically mapped facets

+ +

Table A.17: Not specifically mapped facets

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060113_not_mapped_001

+
+

Handle not mapped facets to transparent

+
+

Clause 6.1.13

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.19 String

+ +

Table A.18: String

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060201_string_001

+
+

Verify mapping of a string type

+
+

Clause 6.2.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.20 Name

+ +

Table A.19: Name

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060204_name_001

+
+

Verify mapping of a Name type

+
+

Clause 6.2.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.21 Any URI

+ +

Table A.20: Any URI

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060212_any_uri_001

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+

2

+
+

Neg_060212_any_uri_002

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+

3

+
+

Pos_060212_any_uri_001

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.22 Integer

+ +

Table A.21: Integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060301_integer_001

+
+

Verify that the integer type shall be translated to TTCN-3 as a plain integer

+
+

Clause 6.3.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.23 Positive integer

+ +

Table A.22: Positive integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060302_positive_integer_001

+
+

Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.24 Non-positive integer

+ +

Table A.23: Non-positive integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060303_non_positive_integer_001

+
+

Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.25 Negative integer

+ +

Table A.24: Negative integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060304_negative_integer_001

+
+

Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.26 Non-negative integer

+ +

Table A.25: Non-negative integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060305_non_negative_integer_001

+
+

Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.27 Long

+ +

Table A.26: Long

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060306_long_001

+
+

Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long

+
+

Clause 6.3.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.28 Unsigned long

+ +

Table A.27: Unsigned long

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060307_unsigned_long_001

+
+

Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long

+
+

Clause 6.3.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.29 Int

+ +

Table A.28: Int

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060308_int_001

+
+

Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1])

+
+

Clause 6.3.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.30 Unsigned int

+ +

Table A.29: Unsigned int

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060309_unsigned_int_001

+
+

Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1]

+
+

Clause 6.3.9

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.31 Short

+ +

Table A.30: Short

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060310_short_001

+
+

Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+
+

Clause 6.3.10

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.32 Unsigned Short

+ +

Table A.31: Unsigned Short

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060311_unsigned_short_001

+
+

Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+
+

Clause 6.3.11

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.33 Byte

+ +

Table A.32: Byte

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060312_byte_001

+
+

Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+
+

Clause 6.3.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.34 Unsigned byte

+ +

Table A.33: Unsigned byte

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060313_unsigned_byte_001

+
+

Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+
+

Clause 6.3.13

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.35 Decimal

+ +

Table A.34: Decimal

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060401_decimal_001

+
+

Verify that decimal type shall be translated to TTCN-3 as a plain float

+
+

Clause 6.4.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.36 Float

+ +

Table A.35: Float

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060402_float_001

+
+

Verify conversion of XSD float type

+
+

Clause 6.4.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.37 Double

+ +

Table A.36: Double

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060403_double_001

+
+

Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]:

+
+

Clause 6.4.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.38 Date and time

+ +

Table A.37: Date and time

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060502_date_and_time_001

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

2

+
+

Neg_060502_date_and_time_002

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

3

+
+

Neg_060502_date_and_time_003

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

4

+
+

Neg_060502_date_and_time_004

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

5

+
+

Pos_060502_date_and_time_001

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

6

+
+

Pos_060502_date_and_time_002

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

7

+
+

Pos_060502_date_and_time_003

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

8

+
+

Pos_060502_date_and_time_004

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.39 Date

+ +

Table A.38: Date

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060504_date_001

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

2

+
+

Neg_060504_date_002

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

3

+
+

Neg_060504_date_003

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

4

+
+

Neg_060504_date_004

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

5

+
+

Pos_060504_date_001

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

6

+
+

Pos_060504_date_002

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

7

+
+

Pos_060504_date_003

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

8

+
+

Pos_060504_date_004

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.40 Gregorian year and month

+ +

Table A.39: Gregorian year and month

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060505_gregorian_year_and_month_001

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

2

+
+

Neg_060505_gregorian_year_and_month_002

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

3

+
+

Neg_060505_gregorian_year_and_month_003

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

4

+
+

Neg_060505_gregorian_year_and_month_004

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

5

+
+

Pos_060505_gregorian_year_and_month_001

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

6

+
+

Pos_060505_gregorian_year_and_month_002

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.41 Gregorian year

+ +

Table A.40: Gregorian year

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060506_gregorian_year_001

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

2

+
+

Pos_060506_gregorian_year_001

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

3

+
+

Pos_060506_gregorian_year_002

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

4

+
+

Pos_060506_gregorian_year_003

+
+

Verify that the gYear allows positive years greater than 9999

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

5

+
+

Pos_060506_gregorian_year_004

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

6

+
+

Pos_060506_gregorian_year_005

+
+

Verify that the gYear accepts negative years

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

7

+
+

Pos_060506_gregorian_year_006

+
+

Verify that the gYear alows negative year with more than 4 digits

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.42 Boolean type

+ +

Table A.41: Boolean type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0607_boolean_type_001

+
+

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+
+

Clause 6.7

+
+

m

+
+

 

+
+

2

+
+

Pos_0607_boolean_type_002

+
+

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+
+

Clause 6.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.43 AnyType and anySimpleType types

+ +

Table A.42: AnyType and anySimpleType types

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0608_anytype_and_anysimpletype_types_001

+
+

Verify conversion of anySimpleType

+
+

Clause 6.8

+
+

m

+
+

 

+
+

2

+
+

Pos_0608_anytype_and_anysimpletype_types_002

+
+

Verify conversion of anyType

+
+

Clause 6.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.44 Id

+ +

Table A.43: Id

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070101_id_001

+
+

Verify conversion of id attribute of global element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070101_id_002

+
+

verify conversion of id attribute of local element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_070101_id_001

+
+

Verify conversion of id attribute of global element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

4

+
+

Pos_070101_id_002

+
+

verify conversion of id attribute of local element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.45 MinOccurs and maxOccurs

+ +

Table A.44: MinOccurs and maxOccurs

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

2

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

3

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

4

+
+

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

5

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

6

+
+

Pos_070104_minoccurs_and_maxoccurs_003

+
+

a list with minOccurs 0 should allow zero elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

7

+
+

Pos_070104_minoccurs_and_maxoccurs_004

+
+

A restricted length list (0, unbounded) should allow elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

8

+
+

Pos_070104_minoccurs_and_maxoccurs_005

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

9

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

10

+
+

Pos_070104_minoccurs_and_maxoccurs_007

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

11

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

12

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

13

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

14

+
+

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

15

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

16

+
+

Pos_070104_minoccurs_and_maxoccurs_003

+
+

a list with minOccurs 0 should allow zero elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

17

+
+

Pos_070104_minoccurs_and_maxoccurs_004

+
+

A restricted length list (0, unbounded) should allow elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

18

+
+

Pos_070104_minoccurs_and_maxoccurs_005

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

19

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

20

+
+

Pos_070104_minoccurs_and_maxoccurs_007

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.46 Default and Fixed

+ +

Table A.45: Default and Fixed

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070105_default_and_fixed_001

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

2

+
+

Pos_070105_default_and_fixed_001

+
+

Verify conversion of fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

3

+
+

Pos_070105_default_and_fixed_002

+
+

Verify conversion of default attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

4

+
+

Pos_070105_default_and_fixed_003

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

5

+
+

Pos_070105_default_and_fixed_004

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

6

+
+

Neg_070105_default_and_fixed_001

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

7

+
+

Pos_070105_default_and_fixed_001

+
+

Verify conversion of fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

8

+
+

Pos_070105_default_and_fixed_002

+
+

Verify conversion of default attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

9

+
+

Pos_070105_default_and_fixed_003

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

10

+
+

Pos_070105_default_and_fixed_004

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.47 Form

+ +

Table A.46: Form

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070106_form_001

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

2

+
+

Pos_070106_form_002

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

3

+
+

Pos_070106_form_003

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

4

+
+

Pos_070106_form_004

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

5

+
+

Pos_070106_form_005

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

6

+
+

Pos_070106_form_006

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

7

+
+

Pos_070106_form_007

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

8

+
+

Pos_070106_form_008

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

9

+
+

Neg_070106_form_001

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

10

+
+

Neg_070106_form_002

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

11

+
+

Neg_070106_form_003

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

12

+
+

Neg_070106_form_004

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

13

+
+

Pos_070106_form_001

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

14

+
+

Pos_070106_form_002

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

15

+
+

Pos_070106_form_003

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

16

+
+

Pos_070106_form_004

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

17

+
+

Pos_070106_form_005

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

18

+
+

Pos_070106_form_006

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

19

+
+

Pos_070106_form_007

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

20

+
+

Pos_070106_form_008

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

21

+
+

Pos_070106_form_009

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

22

+
+

Pos_070106_form_010

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

23

+
+

Pos_070106_form_011

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

24

+
+

Pos_070106_form_012

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.48 Type

+ +

Table A.47: Type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070107_type_001

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

2

+
+

Pos_070107_type_002

+
+

Verify conversion of type attribute referencing global complexType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

3

+
+

Pos_070107_type_003

+
+

Verify conversion of type attribute referencing built-in type

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

4

+
+

Pos_070107_type_001

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

5

+
+

Pos_070107_type_002

+
+

Verify conversion of type attribute referencing global complexType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

6

+
+

Pos_070107_type_003

+
+

Verify conversion of type attribute referencing built-in type

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.49 Use

+ +

Table A.48: Use

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070112_use_001

+
+

Verify that attribute with required use cannot be omitted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

2

+
+

Pos_070112_use_001

+
+

Verify that attribute with required use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

3

+
+

Pos_070112_use_002

+
+

Verify that attribute with optional use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

4

+
+

Pos_070112_use_003

+
+

Verify that attribute with prohibited use is not converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

5

+
+

Neg_070112_use_001

+
+

Verify that attribute with required use cannot be omitted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

6

+
+

Pos_070112_use_001

+
+

Verify that attribute with required use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

7

+
+

Pos_070112_use_002

+
+

Verify that attribute with optional use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

8

+
+

Pos_070112_use_003

+
+

Verify that attribute with prohibited use is not converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.50 Final

+ +

Table A.49: Final

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070114_final_001

+
+

Verify conversion of elements with final attribute

+
+

Clause 7.1.14

+
+

m

+
+

 

+
+

2

+
+

Pos_070114_final_001

+
+

Verify conversion of elements with final attribute

+
+

Clause 7.1.14

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.51 Element component

+ +

Table A.50: Element component

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0703_element_component_001

+
+

Verify conversion of global element of simple type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

2

+
+

Pos_0703_element_component_002

+
+

Verify conversion of global element of user defined type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

3

+
+

Pos_0703_element_component_003

+
+

Verify conversion of global element of locally defined complex type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

4

+
+

Pos_0703_element_component_004

+
+

Verify conversion of local elements defined by reference with different namespace

+
+

Clause 7.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.52 Attribute element definitions

+ +

Table A.51: Attribute element definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070401_attribute_element_definitions_001

+
+

Verify mapping of a globally defined attribute

+
+

Clause 7.4.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070401_attribute_element_definitions_001

+
+

Verify mapping of a globally defined attribute

+
+

Clause 7.4.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.53 Attribute group definitions

+ +

Table A.52: Attribute group definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070402_attribute_group_definitions_001

+
+

Verify mapping of a globally defined attribute group

+
+

Clause 7.4.2

+
+

m

+
+

 

+
+

2

+
+

Pos_070402_attribute_group_definitions_001

+
+

Verify mapping of a globally defined attribute group

+
+

Clause 7.4.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.54 Derivation by restriction

+ +

Table A.53: Derivation by restriction

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070501_derivation_by_restriction_001

+
+

Verify that it is possible to convert anonymous

+
+

Clause 7.5.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.55 Derivation by list

+ +

Table A.54: Derivation by list

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070502_derivation_by_list_001

+
+

Verify length constraint imposed on type derived by list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

2

+
+

Neg_070502_derivation_by_list_002

+
+

Verify constraint imposed on inner type defined inside XSD list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

3

+
+

Pos_070502_derivation_by_list_001

+
+

Verify that derivation by list is converted to record of

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

4

+
+

Pos_070502_derivation_by_list_002

+
+

Verify mapping of facets connected applied to derivation by list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

5

+
+

Pos_070502_derivation_by_list_003

+
+

Verify conversion of facets defined inside XSD list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

6

+
+

Pos_070502_derivation_by_list_004

+
+

Verify transformation of derivation by list with enumerated facets inside

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

7

+
+

Pos_070502_derivation_by_list_005

+
+

Verify transformation of list containing union content

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.56 Derivation by union

+ +

Table A.55: Derivation by union

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070503_derivation_by_union_001

+
+

Verify transformation of union with memberTypes attribute

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

2

+
+

Pos_070503_derivation_by_union_002

+
+

Verify transformation of union with unnamed member types

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

3

+
+

Pos_070503_derivation_by_union_003

+
+

Verify transformation of union with memberTypes attribute and unnamed member types

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

4

+
+

Pos_070503_derivation_by_union_004

+
+

Verify transformation of union with memberTypes attribute and unnamed enumeration

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

5

+
+

Pos_070503_derivation_by_union_005

+
+

Verify transformation of union content containing enumeration facets

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

6

+
+

Pos_070503_derivation_by_union_006

+
+

Verify transformation of union containing list content

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.57 Extending simple content

+ +

Table A.56: Extending simple content

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060101_extending_simple_content_001

+
+

Verify extension of a built-in type by adding an attribute

+
+

Clause 7.6.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.58 Restricting simple content

+ +

Table A.57: Restricting simple content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_07060102_restricting_simple_content_001

+
+

Verify restriction of a base type

+
+

Clause 7.6.1.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060102_restricting_simple_content_001

+
+

Verify restriction of a base type

+
+

Clause 7.6.1.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.59 Complex content derived by extension

+ +

Table A.58: Complex content derived by extension

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060201_derived_by_extension_001

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060201_derived_by_extension_002

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

3

+
+

Pos_07060201_derived_by_extension_003

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

4

+
+

Pos_07060201_derived_by_extension_004

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

5

+
+

Pos_07060201_derived_by_extension_005

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

6

+
+

Pos_07060201_derived_by_extension_006

+
+

Verify mapping of complex type where both the base and

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

7

+
+

Pos_07060201_derived_by_extension_007

+
+

Verify mapping of complex type where extension of a sequence

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

8

+
+

Pos_07060201_derived_by_extension_008

+
+

Verify mapping of complex type:

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

9

+
+

Pos_07060201_derived_by_extension_009

+
+

Verify mapping of complex type:

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.60 Complex content derived by restriction

+ +

Table A.59: Complex content derived by restriction

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060202_derived_by_restriction_001

+
+

Verify mapping of complex content derived by restriction:

+
+

Clause 7.6.2.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.61 Referencing group components

+ +

Table A.60: Referencing group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070603_referencing_group_components_001

+
+

Verify conversion of group reference occurring as child of complex type (sequence, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

2

+
+

Pos_070603_referencing_group_components_002

+
+

Verify conversion of group reference occurring inside sequence

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

3

+
+

Pos_070603_referencing_group_components_003

+
+

Verify conversion of group reference occurring as child of complex type (sequence, optional occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

4

+
+

Pos_070603_referencing_group_components_004

+
+

Verify conversion of group reference occurring as child of complex type (sequence, 0..N)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

5

+
+

Pos_070603_referencing_group_components_005

+
+

Verify conversion of group reference occurring as child of complex type (all, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

6

+
+

Pos_070603_referencing_group_components_006

+
+

Verify conversion of group reference occurring as child of complex type (all, 0..1)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

7

+
+

Pos_070603_referencing_group_components_007

+
+

Verify conversion of group reference occurring as child of complex type (choice, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

8

+
+

Pos_070603_referencing_group_components_008

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..1)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

9

+
+

Pos_070603_referencing_group_components_009

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..N)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

10

+
+

Pos_070603_referencing_group_components_010

+
+

Verify conversion of group reference occurring inside choice

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.62 All content

+ +

Table A.61: All content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070604_all_content_001

+
+

Verify conversion of all content containing mandatory fields

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

2

+
+

Pos_070604_all_content_002

+
+

Verify conversion of all content with minOccurs="0"

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

3

+
+

Pos_070604_all_content_003

+
+

Verify transformation of elements with minOccurs attribute occuring inside all content

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

4

+
+

Pos_070604_all_content_004

+
+

Verify transformation of all content containing attributes

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.63 Choice content

+ +

Table A.62: Choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070605_top_level_001

+
+

Verify that choice content with minOccurs different than 1 is correctly transformed

+
+

Clause 7.6.5

+
+

m

+
+

 

+
+

2

+
+

Pos_070605_top_level_002

+
+

Verify that choice content with maxOccurs larger than 1 is correctly transformed

+
+

Clause 7.6.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.64 Choice with nested elements

+ +

Table A.63: Choice with nested elements

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Clause 7.6.5.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Clause 7.6.5.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.65 Choice with nested group

+ +

Table A.64: Choice with nested group

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060502_choice_with_nested_group_001

+
+

Verify that choice content with nested group is correctly transformed

+
+

Clause 7.6.5.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060502_choice_with_nested_group_001

+
+

Verify that choice content with nested group is correctly transformed

+
+

Clause 7.6.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.66 Choice with nested choice

+ +

Table A.65: Choice with nested choice

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Clause 7.6.5.3

+
+

m

+
+

 

+
+

2

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Clause 7.6.5.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.67 Choice with nested sequence

+ +

Table A.66: Choice with nested sequence

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

2

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

3

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

4

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.68 Choice with nested any

+ +

Table A.67: Choice with nested any

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060505_choice_with_nested_any_001

+
+

Verify that choice content with nested any is correctly transformed

+
+

Clause 7.6.5.5

+
+

m

+
+

 

+
+

2

+
+

Pos_07060505_choice_with_nested_any_001

+
+

Verify that choice content with nested any is correctly transformed

+
+

Clause 7.6.5.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.69 Sequence with nested element content

+ +

Table A.68: Sequence with nested element content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Clause 7.6.6.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Clause 7.6.6.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.70 Sequence with nested group content

+ +

Table A.69: Sequence with nested group content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Clause 7.6.6.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Clause 7.6.6.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.71 Sequence with nested choice content

+ +

Table A.70: Sequence with nested choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Clause 7.6.6.3

+
+

m

+
+

 

+
+

2

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Clause 7.6.6.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.72 Sequence with nested sequence content

+ +

Table A.71: Sequence with nested sequence content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

2

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

3

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

4

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.73 Sequence with nested any content

+ +

Table A.72: Sequence with nested any content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Clause 7.6.6.5

+
+

m

+
+

 

+
+

2

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Clause 7.6.6.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.74 Effect of the minOccurs and maxOccurs attributes on the mapping

+ +

Table A.73: Effect of the minOccurs and maxOccurs attributes on the mapping

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

2

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

3

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

4

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

5

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

6

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

7

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

8

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.75 Attribute definitions, attribute and attributeGroup references

+ +

Table A.74: Attribute definitions, attribute and attributeGroup references

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001

+
+

Verify referencing an attributeGroup in a complexType

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+

2

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002

+
+

Verify mapping of a local attributes, attribute references and attribute group references without a target namespace

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+

3

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003

+
+

Verify mapping of a local attributes, attribute references and attribute group references with a target namespace

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.76 Mixed content

+ +

Table A.75: Mixed content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070608_mixed_content_001

+
+

Verify transformation of complex type with sequence constructor and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

2

+
+

Pos_070608_mixed_content_002

+
+

Verify transformation of omplex type definition with sequence constructor of multiple occurrences and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

3

+
+

Pos_070608_mixed_content_003

+
+

Verify transformation of complex type definition with all constructor and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

4

+
+

Pos_070608_mixed_content_004

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

5

+
+

Pos_070608_mixed_content_005

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.77 The any element

+ +

Table A.76: The any element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070701_the_any_element_001

+
+

Verify conversion of the any element without namespace attribute

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070701_the_any_element_002

+
+

Verify conversion of the any element with ##any namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

3

+
+

Pos_070701_the_any_element_003

+
+

Verify conversion of the any element with ##local namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

4

+
+

Pos_070701_the_any_element_004

+
+

Verify conversion of the any element with ##other namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

5

+
+

Pos_070701_the_any_element_005

+
+

Verify conversion of the any element with ##targetNamespace namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

6

+
+

Pos_070701_the_any_element_006

+
+

Verify conversion of the any element with URL as namespace into record of

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.78 The anyAttribute element

+ +

Table A.77: The anyAttribute element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070702_the_anyattribute_element_001

+
+

Verify conversion of anyAttribute element

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

2

+
+

Pos_070702_the_anyattribute_element_002

+
+

Verify that anyAttribute is converted into optional field

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

3

+
+

Pos_070702_the_anyattribute_element_003

+
+

Verify that the naming rules apply to converted anyAttribute field

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

4

+
+

Pos_070702_the_anyattribute_element_004

+
+

Verify that conversion of anyAttribute present both in extended type and extension base

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

5

+
+

Pos_070702_the_anyattribute_element_005

+
+

Verify that converted anyAttribute field is in correct place

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.79 Annotation

+ +

Table A.78: Annotation

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0708_annotation_001

+
+

Verify that XSD annotation can be processed

+
+

Clause 7.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.80 Group components

+ +

Table A.79: Group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0709_group_components_001

+
+

Verify conversion of group definition with sequence compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+

2

+
+

Pos_0709_group_components_002

+
+

Verify transformation of group definition with sequence compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+

3

+
+

Pos_0709_group_components_003

+
+

Verify conversion of group definition with all compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.81 Identity-constraint definition schema components

+ +

Table A.80: Identity-constraint definition schema components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

2

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

3

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

4

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

5

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

6

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.82 Head elements of substitution groups

+ +

Table A.81: Head elements of substitution groups

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_080101_head_elements_of_substitution_groups_001

+
+

Generic substitution group example

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_080101_head_elements_of_substitution_groups_002

+
+

Show effect of the block and abstract attributes on element substitution

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_080101_head_elements_of_substitution_groups_003

+
+

Blocking substitution

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.83 Annex A (normative): TTCN-3 module XSD

+ +

Table A.82: Annex A (normative): TTCN-3 module XSD

+======= +lang=EN-GB>A.3.16 Total digits + +

Table A.15: Total digits

+>>>>>>> generated ICS TP TSS + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD + + + + +======= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_A_ttcn3_module_xsd_001

+
+

Ensure the builtin XSD type AnySimpleType allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

2

+
+

Neg_A_ttcn3_module_xsd_002

+
+

Ensure the builtin XSD type AnyType allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

3

+
+

Neg_A_ttcn3_module_xsd_003

+
+

Ensure the builtin XSD type String allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

4

+
+

Neg_A_ttcn3_module_xsd_004

+
+

Ensure the builtin XSD type NormalizedString allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

5

+
+

Neg_A_ttcn3_module_xsd_005

+
+

Ensure the builtin XSD type Token allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

6

+
+

Neg_A_ttcn3_module_xsd_006

+
+

Ensure the builtin XSD type Name allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

7

+
+

Neg_A_ttcn3_module_xsd_007

+
+

Ensure the builtin XSD type NMTOKEN allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

8

+
+

Neg_A_ttcn3_module_xsd_008

+
+

Ensure the builtin XSD type NCName allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

9

+
+

Neg_A_ttcn3_module_xsd_009

+
+

Ensure the builtin XSD type ID allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

10

+
+

Neg_A_ttcn3_module_xsd_010

+
+

Ensure the builtin XSD type IDREF allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

11

+
+

Neg_A_ttcn3_module_xsd_011

+
+

Ensure the builtin XSD type ENTITY allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

12

+
+

Neg_A_ttcn3_module_xsd_012

+
+

Ensure the builtin XSD type HexBinary allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

13

+
+

Neg_A_ttcn3_module_xsd_013

+
+

Ensure the builtin XSD type Base64Binary allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

14

+
+

Neg_A_ttcn3_module_xsd_014

+
+

Ensure the builtin XSD type AnyURI allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

15

+
+

Neg_A_ttcn3_module_xsd_015

+
+

Ensure the builtin XSD type Language allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

16

+
+

Neg_A_ttcn3_module_xsd_016

+
+

Ensure the builtin XSD type Integer allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

17

+
+

Neg_A_ttcn3_module_xsd_017

+
+

Ensure the builtin XSD type PositiveInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

18

+
+

Neg_A_ttcn3_module_xsd_018

+
+

Ensure the builtin XSD type NonPositiveInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

19

+
+

Neg_A_ttcn3_module_xsd_019

+
+

Ensure the builtin XSD type NegativeInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

20

+
+

Neg_A_ttcn3_module_xsd_020

+
+

Ensure the builtin XSD type NonNegativeInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

21

+
+

Neg_A_ttcn3_module_xsd_021

+
+

Ensure the builtin XSD type Long allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

22

+
+

Neg_A_ttcn3_module_xsd_022

+
+

Ensure the builtin XSD type UnsignedLong allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

23

+
+

Neg_A_ttcn3_module_xsd_023

+
+

Ensure the builtin XSD type Int allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

24

+
+

Neg_A_ttcn3_module_xsd_024

+
+

Ensure the builtin XSD type UnsignedInt allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

25

+
+

Neg_A_ttcn3_module_xsd_025

+
+

Ensure the builtin XSD type Short allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

26

+
+

Neg_A_ttcn3_module_xsd_026

+
+

Ensure the builtin XSD type UnsignedShort allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

27

+
+

Neg_A_ttcn3_module_xsd_027

+
+

Ensure the builtin XSD type Byte allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

28

+
+

Neg_A_ttcn3_module_xsd_028

+
+

Ensure the builtin XSD type UnsignedByte allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

29

+
+

Neg_A_ttcn3_module_xsd_029

+
+

Ensure the builtin XSD type Decimal allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

30

+
+

Neg_A_ttcn3_module_xsd_030

+
+

Ensure the builtin XSD type Float allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

31

+
+

Neg_A_ttcn3_module_xsd_031

+
+

Ensure the builtin XSD type Double allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

32

+
+

Neg_A_ttcn3_module_xsd_032

+
+

Ensure the builtin XSD type Duration allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

33

+
+

Neg_A_ttcn3_module_xsd_033

+
+

Ensure the builtin XSD type DateTime allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

34

+
+

Neg_A_ttcn3_module_xsd_034

+
+

Ensure the builtin XSD type Time allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

35

+
+

Neg_A_ttcn3_module_xsd_035

+
+

Ensure the builtin XSD type Date allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

36

+
+

Neg_A_ttcn3_module_xsd_036

+
+

Ensure the builtin XSD type GYearMonth allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

37

+
+

Neg_A_ttcn3_module_xsd_037

+
+

Ensure the builtin XSD type GYear allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

38

+
+

Neg_A_ttcn3_module_xsd_038

+
+

Ensure the builtin XSD type GMonthDay allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

39

+
+

Neg_A_ttcn3_module_xsd_039

+
+

Ensure the builtin XSD type GDay allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

40

+
+

Neg_A_ttcn3_module_xsd_040

+
+

Ensure the builtin XSD type GMonth allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

41

+
+

Neg_A_ttcn3_module_xsd_041

+
+

Ensure the builtin XSD type NMTOKENS allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

42

+
+

Neg_A_ttcn3_module_xsd_042

+
+

Ensure the builtin XSD type IDREFS allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

43

+
+

Neg_A_ttcn3_module_xsd_043

+
+

Ensure the builtin XSD type ENTITIES allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

44

+
+

Neg_A_ttcn3_module_xsd_044

+
+

Ensure the builtin XSD type QName allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

45

+
+

Neg_A_ttcn3_module_xsd_045

+
+

Ensure the builtin XSD type Boolean allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

46

+
+

Neg_A_ttcn3_module_xsd_046

+
+

Ensure the builtin XSD type XMLCompatibleString allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

47

+
+

Neg_A_ttcn3_module_xsd_047

+
+

Ensure the builtin XSD type XMLStringWithNoWhitespace allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

48

+
+

Neg_A_ttcn3_module_xsd_048

+
+

Ensure the builtin XSD type XMLStringWithNoCRLFHT allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

49

+
+

Pos_A_ttcn3_module_xsd_001

+
+

Ensure the module XSD is available and contains the builtin XSD type AnySimpleType

+
+

Clause A

+
+

m

+
+

 

+
+

50

+
+

Pos_A_ttcn3_module_xsd_002

+
+

Ensure the module XSD is available and contains the builtin XSD type AnyType

+
+

Clause A

+
+

m

+
+

 

+
+

51

+
+

Pos_A_ttcn3_module_xsd_003

+======= + lang=EN-GB>Neg_060111_total_digits_001

+>>>>>>> generated ICS TP TSS +
+

Ensure the module XSD is available and contains the builtin XSD type String

+======= + lang=EN-GB>Check that totalDigits are converted to value boundaries

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Clause A

+======= +

Clause 6.1.11

+>>>>>>> generated ICS TP TSS +
+

m

+
+

 

+
+

52

+
+

Pos_A_ttcn3_module_xsd_004

+
+

Ensure the module XSD is available and contains the builtin XSD type NormalizedString

+
+

Clause A

+
+

2

+
+

Neg_060111_total_digits_002

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

3

+
+

Neg_060111_total_digits_003

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

4

+
+

Neg_060111_total_digits_004

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

5

+
+

Pos_060111_total_digits_001

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

6

+
+

Pos_060111_total_digits_002

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

7

+
+

Pos_060111_total_digits_003

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

8

+
+

Pos_060111_total_digits_004

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+

9

+
+

Pos_060111_total_digits_005

+
+

Check that totalDigits are converted to value boundaries

+
+

Clause 6.1.11

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.17 Fraction digits

+ +

Table A.16: Fraction digits

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060112_fraction_digits_001

+
+

TODO write purpose

+
+

Clause 6.1.12

+
+

m

+
+

 

+
+

2

+
+

Pos_060112_fraction_digits_002

+
+

TODO write purpose

+
+

Clause 6.1.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.18 Not specifically mapped facets

+ +

Table A.17: Not specifically mapped facets

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060113_not_mapped_001

+
+

Handle not mapped facets to transparent

+
+

Clause 6.1.13

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.19 String

+ +

Table A.18: String

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060201_string_001

+
+

Verify mapping of a string type

+
+

Clause 6.2.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.20 Name

+ +

Table A.19: Name

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060204_name_001

+
+

Verify mapping of a Name type

+
+

Clause 6.2.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.21 Any URI

+ +

Table A.20: Any URI

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060212_any_uri_001

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+

2

+
+

Neg_060212_any_uri_002

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+

3

+
+

Pos_060212_any_uri_001

+
+

Verify mapping of an anyURI type

+
+

Clause 6.2.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.22 Integer

+ +

Table A.21: Integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060301_integer_001

+
+

Verify that the integer type shall be translated to TTCN-3 as a plain integer

+
+

Clause 6.3.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.23 Positive integer

+ +

Table A.22: Positive integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060302_positive_integer_001

+
+

Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.24 Non-positive integer

+ +

Table A.23: Non-positive integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060303_non_positive_integer_001

+
+

Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.25 Negative integer

+ +

Table A.24: Negative integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060304_negative_integer_001

+
+

Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.26 Non-negative integer

+ +

Table A.25: Non-negative integer

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060305_non_negative_integer_001

+
+

Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer

+
+

Clause 6.3.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.27 Long

+ +

Table A.26: Long

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060306_long_001

+
+

Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long

+
+

Clause 6.3.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.28 Unsigned long

+ +

Table A.27: Unsigned long

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060307_unsigned_long_001

+
+

Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long

+
+

Clause 6.3.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.29 Int

+ +

Table A.28: Int

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060308_int_001

+
+

Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1])

+
+

Clause 6.3.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.30 Unsigned int

+ +

Table A.29: Unsigned int

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060309_unsigned_int_001

+
+

Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1]

+
+

Clause 6.3.9

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.31 Short

+ +

Table A.30: Short

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060310_short_001

+
+

Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+
+

Clause 6.3.10

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.32 Unsigned Short

+ +

Table A.31: Unsigned Short

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060311_unsigned_short_001

+
+

Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+
+

Clause 6.3.11

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.33 Byte

+ +

Table A.32: Byte

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060312_byte_001

+
+

Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+
+

Clause 6.3.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.34 Unsigned byte

+ +

Table A.33: Unsigned byte

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060313_unsigned_byte_001

+
+

Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+
+

Clause 6.3.13

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.35 Decimal

+ +

Table A.34: Decimal

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060401_decimal_001

+
+

Verify that decimal type shall be translated to TTCN-3 as a plain float

+
+

Clause 6.4.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.36 Float

+ +

Table A.35: Float

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060402_float_001

+
+

Verify conversion of XSD float type

+
+

Clause 6.4.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.37 Double

+ +

Table A.36: Double

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_060403_double_001

+
+

Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]:

+
+

Clause 6.4.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.38 Date and time

+ +

Table A.37: Date and time

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060502_date_and_time_001

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

2

+
+

Neg_060502_date_and_time_002

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

3

+
+

Neg_060502_date_and_time_003

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

4

+
+

Neg_060502_date_and_time_004

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

5

+
+

Pos_060502_date_and_time_001

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

6

+
+

Pos_060502_date_and_time_002

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

7

+
+

Pos_060502_date_and_time_003

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+

8

+
+

Pos_060502_date_and_time_004

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.39 Date

+ +

Table A.38: Date

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060504_date_001

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

2

+
+

Neg_060504_date_002

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

3

+
+

Neg_060504_date_003

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

4

+
+

Neg_060504_date_004

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

5

+
+

Pos_060504_date_001

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

6

+
+

Pos_060504_date_002

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

7

+
+

Pos_060504_date_003

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+

8

+
+

Pos_060504_date_004

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.40 Gregorian year and month

+ +

Table A.39: Gregorian year and month

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060505_gregorian_year_and_month_001

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

2

+
+

Neg_060505_gregorian_year_and_month_002

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

3

+
+

Neg_060505_gregorian_year_and_month_003

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

4

+
+

Neg_060505_gregorian_year_and_month_004

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

5

+
+

Pos_060505_gregorian_year_and_month_001

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+

6

+
+

Pos_060505_gregorian_year_and_month_002

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.41 Gregorian year

+ +

Table A.40: Gregorian year

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_060506_gregorian_year_001

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

2

+
+

Pos_060506_gregorian_year_001

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

3

+
+

Pos_060506_gregorian_year_002

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

4

+
+

Pos_060506_gregorian_year_003

+
+

Verify that the gYear allows positive years greater than 9999

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

5

+
+

Pos_060506_gregorian_year_004

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

6

+
+

Pos_060506_gregorian_year_005

+
+

Verify that the gYear accepts negative years

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+

7

+
+

Pos_060506_gregorian_year_006

+
+

Verify that the gYear alows negative year with more than 4 digits

+
+

Clause 6.5.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.42 Boolean type

+ +

Table A.41: Boolean type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0607_boolean_type_001

+
+

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+
+

Clause 6.7

+
+

m

+
+

 

+
+

2

+
+

Pos_0607_boolean_type_002

+
+

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+
+

Clause 6.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.43 AnyType and anySimpleType types

+ +

Table A.42: AnyType and anySimpleType types

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0608_anytype_and_anysimpletype_types_001

+
+

Verify conversion of anySimpleType

+
+

Clause 6.8

+
+

m

+
+

 

+
+

2

+
+

Pos_0608_anytype_and_anysimpletype_types_002

+
+

Verify conversion of anyType

+
+

Clause 6.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.44 Id

+ +

Table A.43: Id

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070101_id_001

+
+

Verify conversion of id attribute of global element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070101_id_002

+
+

verify conversion of id attribute of local element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_070101_id_001

+
+

Verify conversion of id attribute of global element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+

4

+
+

Pos_070101_id_002

+
+

verify conversion of id attribute of local element

+
+

Clause 7.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.45 MinOccurs and maxOccurs

+ +

Table A.44: MinOccurs and maxOccurs

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

2

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

3

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

4

+
+

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

5

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

6

+
+

Pos_070104_minoccurs_and_maxoccurs_003

+
+

a list with minOccurs 0 should allow zero elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

7

+
+

Pos_070104_minoccurs_and_maxoccurs_004

+
+

A restricted length list (0, unbounded) should allow elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

8

+
+

Pos_070104_minoccurs_and_maxoccurs_005

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

9

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

10

+
+

Pos_070104_minoccurs_and_maxoccurs_007

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

11

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

12

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

13

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

14

+
+

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

15

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

16

+
+

Pos_070104_minoccurs_and_maxoccurs_003

+
+

a list with minOccurs 0 should allow zero elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

17

+
+

Pos_070104_minoccurs_and_maxoccurs_004

+
+

A restricted length list (0, unbounded) should allow elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

18

+
+

Pos_070104_minoccurs_and_maxoccurs_005

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

19

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+

20

+
+

Pos_070104_minoccurs_and_maxoccurs_007

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Clause 7.1.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.46 Default and Fixed

+ +

Table A.45: Default and Fixed

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070105_default_and_fixed_001

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

2

+
+

Pos_070105_default_and_fixed_001

+
+

Verify conversion of fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

3

+
+

Pos_070105_default_and_fixed_002

+
+

Verify conversion of default attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

4

+
+

Pos_070105_default_and_fixed_003

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

5

+
+

Pos_070105_default_and_fixed_004

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

6

+
+

Neg_070105_default_and_fixed_001

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

7

+
+

Pos_070105_default_and_fixed_001

+
+

Verify conversion of fixed attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

8

+
+

Pos_070105_default_and_fixed_002

+
+

Verify conversion of default attribute

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

9

+
+

Pos_070105_default_and_fixed_003

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+

10

+
+

Pos_070105_default_and_fixed_004

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Clause 7.1.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.47 Form

+ +

Table A.46: Form

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070106_form_001

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

2

+
+

Pos_070106_form_002

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

3

+
+

Pos_070106_form_003

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

4

+
+

Pos_070106_form_004

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

5

+
+

Pos_070106_form_005

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

6

+
+

Pos_070106_form_006

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

7

+
+

Pos_070106_form_007

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

8

+
+

Pos_070106_form_008

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

9

+
+

Neg_070106_form_001

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

10

+
+

Neg_070106_form_002

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

11

+
+

Neg_070106_form_003

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

12

+
+

Neg_070106_form_004

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

13

+
+

Pos_070106_form_001

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

14

+
+

Pos_070106_form_002

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

15

+
+

Pos_070106_form_003

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

16

+
+

Pos_070106_form_004

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

17

+
+

Pos_070106_form_005

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

18

+
+

Pos_070106_form_006

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

19

+
+

Pos_070106_form_007

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

20

+
+

Pos_070106_form_008

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

21

+
+

Pos_070106_form_009

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

22

+
+

Pos_070106_form_010

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

23

+
+

Pos_070106_form_011

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+

24

+
+

Pos_070106_form_012

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Clause 7.1.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.48 Type

+ +

Table A.47: Type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070107_type_001

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

2

+
+

Pos_070107_type_002

+
+

Verify conversion of type attribute referencing global complexType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

3

+
+

Pos_070107_type_003

+
+

Verify conversion of type attribute referencing built-in type

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

4

+
+

Pos_070107_type_001

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

5

+
+

Pos_070107_type_002

+
+

Verify conversion of type attribute referencing global complexType

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+

6

+
+

Pos_070107_type_003

+
+

Verify conversion of type attribute referencing built-in type

+
+

Clause 7.1.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.49 Use

+ +

Table A.48: Use

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070112_use_001

+
+

Verify that attribute with required use cannot be omitted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

2

+
+

Pos_070112_use_001

+
+

Verify that attribute with required use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

3

+
+

Pos_070112_use_002

+
+

Verify that attribute with optional use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

4

+
+

Pos_070112_use_003

+
+

Verify that attribute with prohibited use is not converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

5

+
+

Neg_070112_use_001

+
+

Verify that attribute with required use cannot be omitted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

6

+
+

Pos_070112_use_001

+
+

Verify that attribute with required use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

7

+
+

Pos_070112_use_002

+
+

Verify that attribute with optional use is correctly converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+

8

+
+

Pos_070112_use_003

+
+

Verify that attribute with prohibited use is not converted

+
+

Clause 7.1.12

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.50 Final

+ +

Table A.49: Final

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070114_final_001

+
+

Verify conversion of elements with final attribute

+
+

Clause 7.1.14

+
+

m

+
+

 

+
+

2

+
+

Pos_070114_final_001

+
+

Verify conversion of elements with final attribute

+
+

Clause 7.1.14

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.51 Element component

+ +

Table A.50: Element component

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0703_element_component_001

+
+

Verify conversion of global element of simple type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

2

+
+

Pos_0703_element_component_002

+
+

Verify conversion of global element of user defined type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

3

+
+

Pos_0703_element_component_003

+
+

Verify conversion of global element of locally defined complex type

+
+

Clause 7.3

+
+

m

+
+

 

+
+

4

+
+

Pos_0703_element_component_004

+
+

Verify conversion of local elements defined by reference with different namespace

+
+

Clause 7.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.52 Attribute element definitions

+ +

Table A.51: Attribute element definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070401_attribute_element_definitions_001

+
+

Verify mapping of a globally defined attribute

+
+

Clause 7.4.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070401_attribute_element_definitions_001

+
+

Verify mapping of a globally defined attribute

+
+

Clause 7.4.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.53 Attribute group definitions

+ +

Table A.52: Attribute group definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070402_attribute_group_definitions_001

+
+

Verify mapping of a globally defined attribute group

+
+

Clause 7.4.2

+
+

m

+
+

 

+
+

2

+
+

Pos_070402_attribute_group_definitions_001

+
+

Verify mapping of a globally defined attribute group

+
+

Clause 7.4.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.54 Derivation by restriction

+ +

Table A.53: Derivation by restriction

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070501_derivation_by_restriction_001

+
+

Verify that it is possible to convert anonymous

+
+

Clause 7.5.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.55 Derivation by list

+ +

Table A.54: Derivation by list

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_070502_derivation_by_list_001

+
+

Verify length constraint imposed on type derived by list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

2

+
+

Neg_070502_derivation_by_list_002

+
+

Verify constraint imposed on inner type defined inside XSD list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

3

+
+

Pos_070502_derivation_by_list_001

+
+

Verify that derivation by list is converted to record of

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

4

+
+

Pos_070502_derivation_by_list_002

+
+

Verify mapping of facets connected applied to derivation by list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

5

+
+

Pos_070502_derivation_by_list_003

+
+

Verify conversion of facets defined inside XSD list

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

6

+
+

Pos_070502_derivation_by_list_004

+
+

Verify transformation of derivation by list with enumerated facets inside

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+

7

+
+

Pos_070502_derivation_by_list_005

+
+

Verify transformation of list containing union content

+
+

Clause 7.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.56 Derivation by union

+ +

Table A.55: Derivation by union

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070503_derivation_by_union_001

+
+

Verify transformation of union with memberTypes attribute

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

2

+
+

Pos_070503_derivation_by_union_002

+
+

Verify transformation of union with unnamed member types

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

3

+
+

Pos_070503_derivation_by_union_003

+
+

Verify transformation of union with memberTypes attribute and unnamed member types

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

4

+
+

Pos_070503_derivation_by_union_004

+
+

Verify transformation of union with memberTypes attribute and unnamed enumeration

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

5

+
+

Pos_070503_derivation_by_union_005

+
+

Verify transformation of union content containing enumeration facets

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+

6

+
+

Pos_070503_derivation_by_union_006

+
+

Verify transformation of union containing list content

+
+

Clause 7.5.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.57 Extending simple content

+ +

Table A.56: Extending simple content

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060101_extending_simple_content_001

+
+

Verify extension of a built-in type by adding an attribute

+
+

Clause 7.6.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.58 Restricting simple content

+ +

Table A.57: Restricting simple content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_07060102_restricting_simple_content_001

+
+

Verify restriction of a base type

+
+

Clause 7.6.1.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060102_restricting_simple_content_001

+
+

Verify restriction of a base type

+
+

Clause 7.6.1.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.59 Complex content derived by extension

+ +

Table A.58: Complex content derived by extension

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060201_derived_by_extension_001

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060201_derived_by_extension_002

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

3

+
+

Pos_07060201_derived_by_extension_003

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

4

+
+

Pos_07060201_derived_by_extension_004

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

5

+
+

Pos_07060201_derived_by_extension_005

+
+

Verify mapping of complex type where both the base and the

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

6

+
+

Pos_07060201_derived_by_extension_006

+
+

Verify mapping of complex type where both the base and

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

7

+
+

Pos_07060201_derived_by_extension_007

+
+

Verify mapping of complex type where extension of a sequence

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

8

+
+

Pos_07060201_derived_by_extension_008

+
+

Verify mapping of complex type:

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+

9

+
+

Pos_07060201_derived_by_extension_009

+
+

Verify mapping of complex type:

+
+

Clause 7.6.2.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.60 Complex content derived by restriction

+ +

Table A.59: Complex content derived by restriction

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060202_derived_by_restriction_001

+
+

Verify mapping of complex content derived by restriction:

+
+

Clause 7.6.2.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.61 Referencing group components

+ +

Table A.60: Referencing group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070603_referencing_group_components_001

+
+

Verify conversion of group reference occurring as child of complex type (sequence, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

2

+
+

Pos_070603_referencing_group_components_002

+
+

Verify conversion of group reference occurring inside sequence

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

3

+
+

Pos_070603_referencing_group_components_003

+
+

Verify conversion of group reference occurring as child of complex type (sequence, optional occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

4

+
+

Pos_070603_referencing_group_components_004

+
+

Verify conversion of group reference occurring as child of complex type (sequence, 0..N)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

5

+
+

Pos_070603_referencing_group_components_005

+
+

Verify conversion of group reference occurring as child of complex type (all, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

6

+
+

Pos_070603_referencing_group_components_006

+
+

Verify conversion of group reference occurring as child of complex type (all, 0..1)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

7

+
+

Pos_070603_referencing_group_components_007

+
+

Verify conversion of group reference occurring as child of complex type (choice, one occurrence)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

8

+
+

Pos_070603_referencing_group_components_008

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..1)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

9

+
+

Pos_070603_referencing_group_components_009

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..N)

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+

10

+
+

Pos_070603_referencing_group_components_010

+
+

Verify conversion of group reference occurring inside choice

+
+

Clause 7.6.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.62 All content

+ +

Table A.61: All content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070604_all_content_001

+
+

Verify conversion of all content containing mandatory fields

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

2

+
+

Pos_070604_all_content_002

+
+

Verify conversion of all content with minOccurs="0"

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

3

+
+

Pos_070604_all_content_003

+
+

Verify transformation of elements with minOccurs attribute occuring inside all content

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+

4

+
+

Pos_070604_all_content_004

+
+

Verify transformation of all content containing attributes

+
+

Clause 7.6.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.63 Choice content

+ +

Table A.62: Choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070605_top_level_001

+
+

Verify that choice content with minOccurs different than 1 is correctly transformed

+
+

Clause 7.6.5

+
+

m

+
+

 

+
+

2

+
+

Pos_070605_top_level_002

+
+

Verify that choice content with maxOccurs larger than 1 is correctly transformed

+
+

Clause 7.6.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.64 Choice with nested elements

+ +

Table A.63: Choice with nested elements

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Clause 7.6.5.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Clause 7.6.5.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.65 Choice with nested group

+ +

Table A.64: Choice with nested group

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060502_choice_with_nested_group_001

+
+

Verify that choice content with nested group is correctly transformed

+
+

Clause 7.6.5.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060502_choice_with_nested_group_001

+
+

Verify that choice content with nested group is correctly transformed

+
+

Clause 7.6.5.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.66 Choice with nested choice

+ +

Table A.65: Choice with nested choice

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Clause 7.6.5.3

+
+

m

+
+

 

+
+

2

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Clause 7.6.5.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.67 Choice with nested sequence

+ +

Table A.66: Choice with nested sequence

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

2

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

3

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+

4

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Clause 7.6.5.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.68 Choice with nested any

+ +

Table A.67: Choice with nested any

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060505_choice_with_nested_any_001

+
+

Verify that choice content with nested any is correctly transformed

+
+

Clause 7.6.5.5

+
+

m

+
+

 

+
+

2

+
+

Pos_07060505_choice_with_nested_any_001

+
+

Verify that choice content with nested any is correctly transformed

+
+

Clause 7.6.5.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.69 Sequence with nested element content

+ +

Table A.68: Sequence with nested element content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Clause 7.6.6.1

+
+

m

+
+

 

+
+

2

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Clause 7.6.6.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.70 Sequence with nested group content

+ +

Table A.69: Sequence with nested group content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Clause 7.6.6.2

+
+

m

+
+

 

+
+

2

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Clause 7.6.6.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.71 Sequence with nested choice content

+ +

Table A.70: Sequence with nested choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Clause 7.6.6.3

+
+

m

+
+

 

+
+

2

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Clause 7.6.6.3

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.72 Sequence with nested sequence content

+ +

Table A.71: Sequence with nested sequence content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

2

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

3

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+

4

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Clause 7.6.6.4

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.73 Sequence with nested any content

+ +

Table A.72: Sequence with nested any content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Clause 7.6.6.5

+
+

m

+
+

 

+
+

2

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Clause 7.6.6.5

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.74 Effect of the minOccurs and maxOccurs attributes on the mapping

+ +

Table A.73: Effect of the minOccurs and maxOccurs attributes on the mapping

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

2

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

3

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

4

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

5

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

6

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

7

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+

8

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Clause 7.6.6.6

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.75 Attribute definitions, attribute and attributeGroup references

+ +

Table A.74: Attribute definitions, attribute and attributeGroup references

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001

+
+

Verify referencing an attributeGroup in a complexType

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+

2

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002

+
+

Verify mapping of a local attributes, attribute references and attribute group references without a target namespace

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+

3

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003

+
+

Verify mapping of a local attributes, attribute references and attribute group references with a target namespace

+
+

Clause 7.6.7

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.76 Mixed content

+ +

Table A.75: Mixed content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070608_mixed_content_001

+
+

Verify transformation of complex type with sequence constructor and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

2

+
+

Pos_070608_mixed_content_002

+
+

Verify transformation of omplex type definition with sequence constructor of multiple occurrences and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

3

+
+

Pos_070608_mixed_content_003

+
+

Verify transformation of complex type definition with all constructor and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

4

+
+

Pos_070608_mixed_content_004

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+

5

+
+

Pos_070608_mixed_content_005

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Clause 7.6.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.77 The any element

+ +

Table A.76: The any element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070701_the_any_element_001

+
+

Verify conversion of the any element without namespace attribute

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

2

+
+

Pos_070701_the_any_element_002

+
+

Verify conversion of the any element with ##any namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

3

+
+

Pos_070701_the_any_element_003

+
+

Verify conversion of the any element with ##local namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

4

+
+

Pos_070701_the_any_element_004

+
+

Verify conversion of the any element with ##other namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

5

+
+

Pos_070701_the_any_element_005

+
+

Verify conversion of the any element with ##targetNamespace namespace

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+

6

+
+

Pos_070701_the_any_element_006

+
+

Verify conversion of the any element with URL as namespace into record of

+
+

Clause 7.7.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.78 The anyAttribute element

+ +

Table A.77: The anyAttribute element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_070702_the_anyattribute_element_001

+
+

Verify conversion of anyAttribute element

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

2

+
+

Pos_070702_the_anyattribute_element_002

+
+

Verify that anyAttribute is converted into optional field

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

3

+
+

Pos_070702_the_anyattribute_element_003

+
+

Verify that the naming rules apply to converted anyAttribute field

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

4

+
+

Pos_070702_the_anyattribute_element_004

+
+

Verify that conversion of anyAttribute present both in extended type and extension base

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+

5

+
+

Pos_070702_the_anyattribute_element_005

+
+

Verify that converted anyAttribute field is in correct place

+
+

Clause 7.7.2

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.79 Annotation

+ +

Table A.78: Annotation

+ +
+ + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0708_annotation_001

+
+

Verify that XSD annotation can be processed

+
+

Clause 7.8

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.80 Group components

+ +

Table A.79: Group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0709_group_components_001

+
+

Verify conversion of group definition with sequence compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+

2

+
+

Pos_0709_group_components_002

+
+

Verify transformation of group definition with sequence compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+

3

+
+

Pos_0709_group_components_003

+
+

Verify conversion of group definition with all compositor

+
+

Clause 7.9

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.81 Identity-constraint definition schema components

+ +

Table A.80: Identity-constraint definition schema components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

2

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

3

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

4

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

5

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+

6

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Clause 7.10

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.82 Head elements of substitution groups

+ +

Table A.81: Head elements of substitution groups

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Pos_080101_head_elements_of_substitution_groups_001

+
+

Generic substitution group example

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+

2

+
+

Pos_080101_head_elements_of_substitution_groups_002

+
+

Show effect of the block and abstract attributes on element substitution

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+

3

+
+

Pos_080101_head_elements_of_substitution_groups_003

+
+

Blocking substitution

+
+

Clause 8.1.1

+
+

m

+
+

 

+
+ +
+ +

 

+ + +

A.3.83 Annex A (normative): TTCN-3 module XSD

+ +

Table A.82: Annex A (normative): TTCN-3 module XSD

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + + +======= +

52

+ + + + + + + + + + + + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + +======= +

55

+ + + + + + + + + + + +>>>>>>> generated ICS TP TSS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

Neg_A_ttcn3_module_xsd_001

+
+

Ensure the builtin XSD type AnySimpleType allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

2

+
+

Neg_A_ttcn3_module_xsd_002

+
+

Ensure the builtin XSD type AnyType allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

3

+
+

Neg_A_ttcn3_module_xsd_003

+
+

Ensure the builtin XSD type String allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

4

+
+

Neg_A_ttcn3_module_xsd_004

+
+

Ensure the builtin XSD type NormalizedString allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

5

+
+

Neg_A_ttcn3_module_xsd_005

+
+

Ensure the builtin XSD type Token allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

6

+
+

Neg_A_ttcn3_module_xsd_006

+
+

Ensure the builtin XSD type Name allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

7

+
+

Neg_A_ttcn3_module_xsd_007

+
+

Ensure the builtin XSD type NMTOKEN allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

8

+
+

Neg_A_ttcn3_module_xsd_008

+
+

Ensure the builtin XSD type NCName allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

9

+
+

Neg_A_ttcn3_module_xsd_009

+
+

Ensure the builtin XSD type ID allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

10

+
+

Neg_A_ttcn3_module_xsd_010

+
+

Ensure the builtin XSD type IDREF allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

11

+
+

Neg_A_ttcn3_module_xsd_011

+
+

Ensure the builtin XSD type ENTITY allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

12

+
+

Neg_A_ttcn3_module_xsd_012

+
+

Ensure the builtin XSD type HexBinary allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

13

+
+

Neg_A_ttcn3_module_xsd_013

+
+

Ensure the builtin XSD type Base64Binary allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

14

+
+

Neg_A_ttcn3_module_xsd_014

+
+

Ensure the builtin XSD type AnyURI allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

15

+
+

Neg_A_ttcn3_module_xsd_015

+
+

Ensure the builtin XSD type Language allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

16

+
+

Neg_A_ttcn3_module_xsd_016

+
+

Ensure the builtin XSD type Integer allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

17

+
+

Neg_A_ttcn3_module_xsd_017

+
+

Ensure the builtin XSD type PositiveInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

18

+
+

Neg_A_ttcn3_module_xsd_018

+
+

Ensure the builtin XSD type NonPositiveInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

19

+
+

Neg_A_ttcn3_module_xsd_019

+
+

Ensure the builtin XSD type NegativeInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

20

+
+

Neg_A_ttcn3_module_xsd_020

+
+

Ensure the builtin XSD type NonNegativeInteger allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

21

+
+

Neg_A_ttcn3_module_xsd_021

+
+

Ensure the builtin XSD type Long allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

22

+
+

Neg_A_ttcn3_module_xsd_022

+
+

Ensure the builtin XSD type UnsignedLong allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

23

+
+

Neg_A_ttcn3_module_xsd_023

+
+

Ensure the builtin XSD type Int allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

24

+
+

Neg_A_ttcn3_module_xsd_024

+
+

Ensure the builtin XSD type UnsignedInt allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

25

+
+

Neg_A_ttcn3_module_xsd_025

+
+

Ensure the builtin XSD type Short allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

26

+
+

Neg_A_ttcn3_module_xsd_026

+
+

Ensure the builtin XSD type UnsignedShort allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

27

+
+

Neg_A_ttcn3_module_xsd_027

+
+

Ensure the builtin XSD type Byte allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

28

+
+

Neg_A_ttcn3_module_xsd_028

+
+

Ensure the builtin XSD type UnsignedByte allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

29

+
+

Neg_A_ttcn3_module_xsd_029

+
+

Ensure the builtin XSD type Decimal allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

30

+
+

Neg_A_ttcn3_module_xsd_030

+
+

Ensure the builtin XSD type Float allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

31

+
+

Neg_A_ttcn3_module_xsd_031

+
+

Ensure the builtin XSD type Double allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

32

+
+

Neg_A_ttcn3_module_xsd_032

+
+

Ensure the builtin XSD type Duration allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

33

+
+

Neg_A_ttcn3_module_xsd_033

+
+

Ensure the builtin XSD type DateTime allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

34

+
+

Neg_A_ttcn3_module_xsd_034

+
+

Ensure the builtin XSD type Time allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

35

+
+

Neg_A_ttcn3_module_xsd_035

+
+

Ensure the builtin XSD type Date allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

36

+
+

Neg_A_ttcn3_module_xsd_036

+
+

Ensure the builtin XSD type GYearMonth allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

37

+
+

Neg_A_ttcn3_module_xsd_037

+
+

Ensure the builtin XSD type GYear allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

38

+
+

Neg_A_ttcn3_module_xsd_038

+
+

Ensure the builtin XSD type GMonthDay allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

39

+
+

Neg_A_ttcn3_module_xsd_039

+
+

Ensure the builtin XSD type GDay allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

40

+
+

Neg_A_ttcn3_module_xsd_040

+
+

Ensure the builtin XSD type GMonth allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

41

+
+

Neg_A_ttcn3_module_xsd_041

+
+

Ensure the builtin XSD type NMTOKENS allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

42

+
+

Neg_A_ttcn3_module_xsd_042

+
+

Ensure the builtin XSD type IDREFS allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

43

+
+

Neg_A_ttcn3_module_xsd_043

+
+

Ensure the builtin XSD type ENTITIES allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

44

+
+

Neg_A_ttcn3_module_xsd_044

+
+

Ensure the builtin XSD type QName allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

45

+
+

Neg_A_ttcn3_module_xsd_045

+
+

Ensure the builtin XSD type Boolean allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

46

+
+

Neg_A_ttcn3_module_xsd_046

+
+

Ensure the builtin XSD type XMLCompatibleString allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

47

+
+

Neg_A_ttcn3_module_xsd_047

+
+

Ensure the builtin XSD type XMLStringWithNoWhitespace allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

48

+
+

Neg_A_ttcn3_module_xsd_048

+
+

Ensure the builtin XSD type XMLStringWithNoCRLFHT allows only valid values

+
+

Clause A

+
+

m

+
+

 

+
+

49

+
+

Pos_A_ttcn3_module_xsd_001

+
+

Ensure the module XSD is available and contains the builtin XSD type AnySimpleType

+
+

Clause A

+
+

m

+
+

 

+
+

50

+
+

Pos_A_ttcn3_module_xsd_002

+
+

Ensure the module XSD is available and contains the builtin XSD type AnyType

+
+

Clause A

+
+

m

+
+

 

+
+<<<<<<< HEAD +

53

+======= +

51

+>>>>>>> generated ICS TP TSS +
+

Pos_A_ttcn3_module_xsd_005

+======= + lang=EN-GB>Pos_A_ttcn3_module_xsd_003

+>>>>>>> generated ICS TP TSS +
+

Ensure the module XSD is available and contains the builtin XSD type Token

+======= + lang=EN-GB>Ensure the module XSD is available and contains the builtin XSD type String

+>>>>>>> generated ICS TP TSS +
+

Clause A

+
+

m

+
+

 

+
+<<<<<<< HEAD +

54

+
+

Pos_A_ttcn3_module_xsd_006

+
+

Ensure the module XSD is available and contains the builtin XSD type Name

+
+

Clause A

+
+

Pos_A_ttcn3_module_xsd_004

+
+

Ensure the module XSD is available and contains the builtin XSD type NormalizedString

+
+

Clause A

+
+

m

+
+

 

+
+

53

+
+

Pos_A_ttcn3_module_xsd_005

+
+

Ensure the module XSD is available and contains the builtin XSD type Token

+
+

Clause A

+
+

m

+
+

 

+
+<<<<<<< HEAD +

55

+======= +

54

+>>>>>>> generated ICS TP TSS +
+

Pos_A_ttcn3_module_xsd_007

+======= + lang=EN-GB>Pos_A_ttcn3_module_xsd_006

+>>>>>>> generated ICS TP TSS +
+

Ensure the module XSD is available and contains the builtin XSD type NMTOKEN

+======= + lang=EN-GB>Ensure the module XSD is available and contains the builtin XSD type Name

+>>>>>>> generated ICS TP TSS +
+

Clause A

+
+

m

+
+

 

+
+<<<<<<< HEAD +

56

+
+

Pos_A_ttcn3_module_xsd_008

+
+

Ensure the module XSD is available and contains the builtin XSD type NCName

+
+

Pos_A_ttcn3_module_xsd_007

+
+

Ensure the module XSD is available and contains the builtin XSD type NMTOKEN

+
+

Clause A

+
+

m

+
+

 

+
+

56

+
+

Pos_A_ttcn3_module_xsd_008

+
+

Ensure the module XSD is available and contains the builtin XSD type NCName

+
+

Clause A

+
+

m

+
+

 

+
+

57

+
+

Pos_A_ttcn3_module_xsd_009

+
+

Ensure the module XSD is available and contains the builtin XSD type ID

+
+

Clause A

+
+

m

+
+

 

+
+

58

+
+

Pos_A_ttcn3_module_xsd_010

+
+

Ensure the module XSD is available and contains the builtin XSD type IDREF

+
+

Clause A

+
+

m

+
+

 

+
+

59

+
+

Pos_A_ttcn3_module_xsd_011

+
+

Ensure the module XSD is available and contains the builtin XSD type ENTITY

+
+

Clause A

+
+

m

+
+

 

+
+

60

+
+

Pos_A_ttcn3_module_xsd_012

+
+

Ensure the module XSD is available and contains the builtin XSD type HexBinary

+
+

Clause A

+
+

m

+
+

 

+
+

61

+
+

Pos_A_ttcn3_module_xsd_013

+
+

Ensure the module XSD is available and contains the builtin XSD type Base64Binary

+
+

Clause A

+
+

m

+
+

 

+
+

62

+
+

Pos_A_ttcn3_module_xsd_014

+
+

Ensure the module XSD is available and contains the builtin XSD type AnyURI

+
+

Clause A

+
+

m

+
+

 

+
+

63

+
+

Pos_A_ttcn3_module_xsd_015

+
+

Ensure the module XSD is available and contains the builtin XSD type Language

+
+

Clause A

+
+

m

+
+

 

+
+

64

+
+

Pos_A_ttcn3_module_xsd_016

+
+

Ensure the module XSD is available and contains the builtin XSD type Integer

+
+

Clause A

+
+

m

+
+

 

+
+

65

+
+

Pos_A_ttcn3_module_xsd_017

+
+

Ensure the module XSD is available and contains the builtin XSD type PositiveInteger

+
+

Clause A

+
+

m

+
+

 

+
+

66

+
+

Pos_A_ttcn3_module_xsd_018

+
+

Ensure the module XSD is available and contains the builtin XSD type NonPositiveInteger

+
+

Clause A

+
+

m

+
+

 

+
+

67

+
+

Pos_A_ttcn3_module_xsd_019

+
+

Ensure the module XSD is available and contains the builtin XSD type NegativeInteger

+
+

Clause A

+
+

m

+
+

 

+
+

68

+
+

Pos_A_ttcn3_module_xsd_020

+
+

Ensure the module XSD is available and contains the builtin XSD type NonNegativeInteger

+
+

Clause A

+
+

m

+
+

 

+
+

69

+
+

Pos_A_ttcn3_module_xsd_021

+
+

Ensure the module XSD is available and contains the builtin XSD type Long

+
+

Clause A

+
+

m

+
+

 

+
+

70

+
+

Pos_A_ttcn3_module_xsd_022

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedLong

+
+

Clause A

+
+

m

+
+

 

+
+

71

+
+

Pos_A_ttcn3_module_xsd_023

+
+

Ensure the module XSD is available and contains the builtin XSD type Int

+
+

Clause A

+
+

m

+
+

 

+
+

72

+
+

Pos_A_ttcn3_module_xsd_024

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedInt

+
+

Clause A

+
+

m

+
+

 

+
+

73

+
+

Pos_A_ttcn3_module_xsd_025

+
+

Ensure the module XSD is available and contains the builtin XSD type Short

+
+

Clause A

+
+

m

+
+

 

+
+

74

+
+

Pos_A_ttcn3_module_xsd_026

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedShort

+
+

Clause A

+
+

m

+
+

 

+
+

75

+
+

Pos_A_ttcn3_module_xsd_027

+
+

Ensure the module XSD is available and contains the builtin XSD type Byte

+
+

Clause A

+
+

m

+
+

 

+
+

76

+
+

Pos_A_ttcn3_module_xsd_028

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedByte

+
+

Clause A

+
+

m

+
+

 

+
+

77

+
+

Pos_A_ttcn3_module_xsd_029

+
+

Ensure the module XSD is available and contains the builtin XSD type Decimal

+
+

Clause A

+
+

m

+
+

 

+
+

78

+
+

Pos_A_ttcn3_module_xsd_030

+
+

Ensure the module XSD is available and contains the builtin XSD type Float

+
+

Clause A

+
+

m

+
+

 

+
+

79

+
+

Pos_A_ttcn3_module_xsd_031

+
+

Ensure the module XSD is available and contains the builtin XSD type Double

+
+

Clause A

+
+

m

+
+

 

+
+

80

+
+

Pos_A_ttcn3_module_xsd_032

+
+

Ensure the module XSD is available and contains the builtin XSD type Duration

+
+

Clause A

+
+

m

+
+

 

+
+

81

+
+

Pos_A_ttcn3_module_xsd_033

+
+

Ensure the module XSD is available and contains the builtin XSD type DateTime

+
+

Clause A

+
+

m

+
+

 

+
+

82

+
+

Pos_A_ttcn3_module_xsd_034

+
+

Ensure the module XSD is available and contains the builtin XSD type Time

+
+

Clause A

+
+

m

+
+

 

+
+

83

+
+

Pos_A_ttcn3_module_xsd_035

+
+

Ensure the module XSD is available and contains the builtin XSD type Date

+
+

Clause A

+
+

m

+
+

 

+
+

84

+
+

Pos_A_ttcn3_module_xsd_036

+
+

Ensure the module XSD is available and contains the builtin XSD type GYearMonth

+
+

Clause A

+
+

m

+
+

 

+
+

85

+
+

Pos_A_ttcn3_module_xsd_037

+
+

Ensure the module XSD is available and contains the builtin XSD type GYear

+
+

Clause A

+
+

m

+
+

 

+
+

86

+
+

Pos_A_ttcn3_module_xsd_038

+
+

Ensure the module XSD is available and contains the builtin XSD type GMonthDay

+
+

Clause A

+
+

m

+
+

 

+
+

87

+
+

Pos_A_ttcn3_module_xsd_039

+
+

Ensure the module XSD is available and contains the builtin XSD type GDay

+
+

Clause A

+
+

m

+
+

 

+
+

88

+
+

Pos_A_ttcn3_module_xsd_040

+
+

Ensure the module XSD is available and contains the builtin XSD type GMonth

+
+

Clause A

+
+

m

+
+

 

+
+

89

+
+

Pos_A_ttcn3_module_xsd_041

+
+

Ensure the module XSD is available and contains the builtin XSD type NMTOKENS

+
+

Clause A

+
+

m

+
+

 

+
+

90

+
+

Pos_A_ttcn3_module_xsd_042

+
+

Ensure the module XSD is available and contains the builtin XSD type IDREFS

+
+

Clause A

+
+

m

+
+

 

+
+

91

+
+

Pos_A_ttcn3_module_xsd_043

+
+

Ensure the module XSD is available and contains the builtin XSD type ENTITIES

+
+

Clause A

+
+

m

+
+

 

+
+

92

+
+

Pos_A_ttcn3_module_xsd_044

+
+

Ensure the module XSD is available and contains the builtin XSD type QName

+
+

Clause A

+
+

m

+
+

 

+
+

93

+
+

Pos_A_ttcn3_module_xsd_045

+
+

Ensure the module XSD is available and contains the builtin XSD type Boolean

+
+

Clause A

+
+

m

+
+

 

+
+

94

+
+

Pos_A_ttcn3_module_xsd_046

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLCompatibleString

+
+

Clause A

+
+

m

+
+

 

+
+

95

+
+

Pos_A_ttcn3_module_xsd_047

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoWhitespace

+
+

Clause A

+
+

m

+
+

 

+
+

96

+
+

Pos_A_ttcn3_module_xsd_048

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoCRLFHT

+
+

Clause A

+
+

m

+
+

 

+
+ +
+ +

 

+ + + + + + diff --git a/Docs/deliverable/stf475-tp.html b/Docs/deliverable/stf475-tp.html new file mode 100644 index 0000000000000000000000000000000000000000..95fa6be686e324375e4f3d4e4f4423e2458a423c --- /dev/null +++ b/Docs/deliverable/stf475-tp.html @@ -0,0 +1,77346 @@ + + + + + + + + + + + + + + + + + + +
+ +

A.2.1 Mapping XML Schemas

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_05_top_level_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that error is generated for missing XSD language tag in import clause

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.2 Namespaces

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050101_namespaces_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that schema with target namespace is correctly translated into single module

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050101_namespaces_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify schema with no target namespace is correctly translated into single module

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050101_namespaces_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that two schemas with the same target namespace are correctly translated

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050101_namespaces_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that two schemas with no target namespace are correctly translated

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.3 Includes

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050102_includes_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Test inclusion of a schema with the same namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050102_includes_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that included schema with no target namespace is transformed twice (inclusion)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050102_includes_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that included schema with no target namespace is transformed twice (no namespace)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.4 Imports

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050103_imports_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that XSD import statement is handled correctly

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_050103_imports_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that it is not allowed to import imports from XSD schemas

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.5 Attributes of the XSD schema element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified default element form is correctly processed (no namespace prefix)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified default element form is correctly processed (namespace prefix used)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified default element form is correctly processed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified default attribute form is correctly processed (no namespace prefix)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified default attribute form is correctly processed (namespace prefix used)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050104_attributes_of_the_xsd_schema_element_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified default attribute form is correctly processed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.6 Name conversion rules

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of symbols into U+005f (low line)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that non-ASCI letters are not present in transforming identifiers

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

TODO: add description

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that leading and trailing low lines are removed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that type names are capitalized

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that prefixing type names with "X" works correctly

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that names of field of structure types are uncapitalized

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that names of enumerated items are uncapitalized

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that prefixing field names of structured types with "x" works correctly

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_010

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that prefixing enumerated items with "x" works correctly

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_011

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check transformation of empty type identifier into "X"

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_012

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check transformation of empty structured field identifier into "x"

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_013

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check transformation of empty enumerated value into "x"

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_014

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that additional suffices are attached in case of name clashes between types

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_015

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between types and local module

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_016

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between types and imported module

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_017

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between field names

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_018

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between field name and keyword

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_019

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between field name and predefined function

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_020

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between enumerated items

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_021

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between enumerated item and keyword

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_022

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that suffix is attached in case of name clash between enumerated item and predefined function

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050202_name_conversion_rules_023

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that name clash between module names is resolved using suffix

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.7 Order of the mapping

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050203_order_of_the_mapping_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify order of top-level schema components

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050203_order_of_the_mapping_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that alphabetical sorting is based on character ordinal numbers

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050203_order_of_the_mapping_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that alphabetical sorting is done only inside sets of items

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050203_order_of_the_mapping_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Asure that namespaces are ordered lexically

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_050203_order_of_the_mapping_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 5.2.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Asure that namespaces are ordered lexically

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.8 Built-in data types

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_06_top_level_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of simpleType based on built-in XSD type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.9 Length

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060101_length_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060101_length_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060101_length_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type.

+<<<<<<< HEAD +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.10 Enumeration

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060105_enumeration_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of simple type definition that is a restriction of

+======= +>>>>>>> generated ICS TP TSS +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.10 Enumeration

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060105_enumeration_002

+======= +

TP_Pos_060105_enumeration_001

+>>>>>>> generated ICS TP TSS +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of simple type definition that is a restriction of

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060105_enumeration_003

+======= +

TP_Pos_060105_enumeration_002

+>>>>>>> generated ICS TP TSS +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of simple type definition that is a restriction of

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060105_enumeration_004

+======= +

TP_Pos_060105_enumeration_003

+>>>>>>> generated ICS TP TSS +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of simple type definition that is a restriction of

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060105_enumeration_005

+======= +

TP_Pos_060105_enumeration_004

+>>>>>>> generated ICS TP TSS +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify mapping of simple type definition that is a restriction of another

+======= +

Verify mapping of simple type definition that is a restriction of

+>>>>>>> generated ICS TP TSS +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060105_enumeration_006

+======= +

TP_Pos_060105_enumeration_005

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060105_enumeration_006

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TODO write purpose

+======= +

Verify mapping of simple type definition that is a restriction of another

+>>>>>>> generated ICS TP TSS +======= +

TODO write purpose

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060105_enumeration_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060105_enumeration_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool rejects validation in case of restricted enumerated value length due xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060105_enumeration_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.11 MinInclusive

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Neg_060105_enumeration_004

+======= +

TP_Pos_060107_mininclusive_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Neg_060105_enumeration_004

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.1.5

+======= +

ES 201 873-9 [1], Clause 6.1.7

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.1.5

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

disallow enumeration values removed by restriction

+======= +

Verify mapping of an integer element with a minInclusive facet

+>>>>>>> generated ICS TP TSS +======= +

disallow enumeration values removed by restriction

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.11 MinInclusive

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060107_mininclusive_001

+======= +

TP_Pos_060107_mininclusive_002

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060107_mininclusive_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of an integer element with a minInclusive facet

+======= +

Verify mapping of a float element with a numeric minInclusive value

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of an integer element with a minInclusive facet

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060107_mininclusive_002

+======= +

TP_Pos_060107_mininclusive_003

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060107_mininclusive_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of a float element with a numeric minInclusive value

+======= +

Verify mapping of a float element with special minInclusive values

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of a float element with a numeric minInclusive value

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060107_mininclusive_003

+======= +

TP_Pos_060107_mininclusive_004

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060107_mininclusive_003

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a float element with special minInclusive values

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060107_mininclusive_004

+======= +

TP_Pos_060107_mininclusive_005

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060107_mininclusive_004

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a float element with special minInclusive values

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+ +

A.2.12 MaxInclusive

+ +
+
>>>>>> generated ICS TP TSS + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060107_mininclusive_005

+======= +

TP_Pos_060108_maxinclusive_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060107_mininclusive_005

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.1.7

+======= +

ES 201 873-9 [1], Clause 6.1.8

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.1.7

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of a float element with special minInclusive values

+======= +

Verify mapping of elements of type integer with maxInclusive facet

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of a float element with special minInclusive values

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> update +
+
+

A.2.12 MaxInclusive

+ +
+
>>>>>> generated ICS TP TSS +======= +>>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060108_maxinclusive_001

+======= +

TP_Pos_060108_maxinclusive_002

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060108_maxinclusive_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of elements of type integer with maxInclusive facet

+======= +

Verify mapping of a float type with a numeric maxInclusive facet

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of elements of type integer with maxInclusive facet

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060108_maxinclusive_002

+======= +

TP_Pos_060108_maxinclusive_003

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060108_maxinclusive_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> update +

TP_Pos_060108_maxinclusive_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +======= +>>>>>>> generated ICS TP TSS +======= +>>>>>>> update +

TP_Pos_060108_maxinclusive_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a float type with a numeric maxInclusive facet

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.13 MinExclusive

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060109_minexclusive_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool accepts values restricted by xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060109_minexclusive_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool accepts values restricted by xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060109_minexclusive_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060109_minexclusive_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify if tool rejects validation in case of restricted value due xsd type declaration.

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.14 MaxExclusive

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060110_maxexclusive_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a maxExclusive facet applied to a type, which is derivative of integer

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060110_maxexclusive_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a maxExclusive facet applied to the float type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060110_maxexclusive_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a maxExclusive facet applied to the float type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060110_maxexclusive_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that INF (negative infinity) or NaN (not-a-number), this type shall not be translated to TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.15 Total digits

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060111_total_digits_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060111_total_digits_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060111_total_digits_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060111_total_digits_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060111_total_digits_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060111_total_digits_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060111_total_digits_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060111_total_digits_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060111_total_digits_004

+<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.11

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Check that totalDigits are converted to value boundaries

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.16 Fraction digits

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060112_fraction_digits_001

+<<<<<<< HEAD +======= +>>>>>>> generated ICS TP TSS +======= +>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.1.12

+======= +

ES 201 873-9 [1], Clause 6.1.11

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.1.12

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TODO write purpose

+======= +

Check that totalDigits are converted to value boundaries

+>>>>>>> generated ICS TP TSS +======= +

TODO write purpose

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +<<<<<<< HEAD +
+ +

A.2.16 Fraction digits

+ +
+
>>>>>> generated ICS TP TSS +======= +
>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060112_fraction_digits_002

+======= +

TP_Pos_060112_fraction_digits_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060112_fraction_digits_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

TODO write purpose

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.17 Not specifically mapped facets

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060113_not_mapped_001

+======= +

TP_Pos_060112_fraction_digits_002

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060113_not_mapped_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.1.13

+======= +

ES 201 873-9 [1], Clause 6.1.12

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.1.13

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Handle not mapped facets to transparent

+======= +

TODO write purpose

+>>>>>>> generated ICS TP TSS +======= +

Handle not mapped facets to transparent

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.18 StringA.2.17 Not specifically mapped facets>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.18 String>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060201_string_001

+======= +

TP_Pos_060113_not_mapped_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060201_string_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.2.1

+======= +

ES 201 873-9 [1], Clause 6.1.13

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.2.1

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of a string type

+======= +

Handle not mapped facets to transparent

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of a string type

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.19 NameA.2.18 String>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.19 Name>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060204_name_001

+======= +

TP_Pos_060201_string_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060204_name_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.2.4

+======= +

ES 201 873-9 [1], Clause 6.2.1

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.2.4

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify mapping of a Name type

+======= +

Verify mapping of a string type

+>>>>>>> generated ICS TP TSS +======= +

Verify mapping of a Name type

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.20 Any URIA.2.19 Name>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.20 Any URI>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060212_any_uri_001

+======= +

TP_Pos_060204_name_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060212_any_uri_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.2.12

+======= +

ES 201 873-9 [1], Clause 6.2.4

+>>>>>>> generated ICS TP TSS +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify mapping of an anyURI type

+======= +

Verify mapping of a Name type

+>>>>>>> generated ICS TP TSS +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+
+

A.2.20 Any URI

+ +
+
>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Neg_060212_any_uri_001

+======= +

TP_Pos_060212_any_uri_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Neg_060212_any_uri_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.2.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of an anyURI type

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Neg_060212_any_uri_002

+======= +

TP_Neg_060212_any_uri_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Neg_060212_any_uri_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.2.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of an anyURI type

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.21 Integer

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060301_integer_001

+======= +

TP_Neg_060212_any_uri_002

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060301_integer_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.1

+======= +

ES 201 873-9 [1], Clause 6.2.12

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.1

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that the integer type shall be translated to TTCN-3 as a plain integer

+======= +

Verify mapping of an anyURI type

+>>>>>>> generated ICS TP TSS +======= +

Verify that the integer type shall be translated to TTCN-3 as a plain integer

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.22 Positive integerA.2.21 Integer>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.22 Positive integer>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060302_positive_integer_001

+======= +

TP_Pos_060301_integer_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060302_positive_integer_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.2

+======= +

ES 201 873-9 [1], Clause 6.3.1

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.2

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer

+======= +

Verify that the integer type shall be translated to TTCN-3 as a plain integer

+>>>>>>> generated ICS TP TSS +======= +

Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.23 Non-positive integerA.2.22 Positive integer>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.23 Non-positive integer>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060303_non_positive_integer_001

+======= +

TP_Pos_060302_positive_integer_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060303_non_positive_integer_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.3

+======= +

ES 201 873-9 [1], Clause 6.3.2

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.3

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer

+======= +

Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> generated ICS TP TSS +======= +

Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.24 Negative integerA.2.23 Non-positive integer>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.24 Negative integer>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060304_negative_integer_001

+======= +

TP_Pos_060303_non_positive_integer_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060304_negative_integer_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.4

+======= +

ES 201 873-9 [1], Clause 6.3.3

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.4

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer

+======= +

Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> generated ICS TP TSS +======= +

Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.25 Non-negative integerA.2.24 Negative integer>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.25 Non-negative integer>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060305_non_negative_integer_001

+======= +

TP_Pos_060304_negative_integer_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060305_non_negative_integer_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.5

+======= +

ES 201 873-9 [1], Clause 6.3.4

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.5

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer

+======= +

Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> generated ICS TP TSS +======= +

Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.26 LongA.2.25 Non-negative integer>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.26 Long>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060306_long_001

+======= +

TP_Pos_060305_non_negative_integer_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060306_long_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.6

+======= +

ES 201 873-9 [1], Clause 6.3.5

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.6

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long

+======= +

Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer

+>>>>>>> generated ICS TP TSS +======= +

Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.27 Unsigned longA.2.26 Long>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.27 Unsigned long>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060307_unsigned_long_001

+======= +

TP_Pos_060306_long_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060307_unsigned_long_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.7

+======= +

ES 201 873-9 [1], Clause 6.3.6

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.7

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long

+======= +

Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long

+>>>>>>> generated ICS TP TSS +======= +

Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.28 IntA.2.27 Unsigned long>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.28 Int>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060308_int_001

+======= +

TP_Pos_060307_unsigned_long_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060308_int_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.8

+======= +

ES 201 873-9 [1], Clause 6.3.7

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.8

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1])

+======= +

Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long

+>>>>>>> generated ICS TP TSS +======= +

Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1])

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.29 Unsigned intA.2.28 Int>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.29 Unsigned int>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060309_unsigned_int_001

+======= +

TP_Pos_060308_int_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060309_unsigned_int_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.9

+======= +

ES 201 873-9 [1], Clause 6.3.8

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.9

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +

Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1]

+======= +

Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1])

+>>>>>>> generated ICS TP TSS +======= +

Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1]

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.30 ShortA.2.29 Unsigned int>>>>>> generated ICS TP TSS +======= +lang=EN-GB>A.2.30 Short>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +<<<<<<< HEAD +

TP_Pos_060310_short_001

+======= +

TP_Pos_060309_unsigned_int_001

+>>>>>>> generated ICS TP TSS +======= +

TP_Pos_060310_short_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.10

+======= +

ES 201 873-9 [1], Clause 6.3.9

+>>>>>>> generated ICS TP TSS +======= +

ES 201 873-9 [1], Clause 6.3.10

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +<<<<<<< HEAD +======= +

Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1]

+======= +

Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.30 ShortA.2.31 Unsigned Short>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060310_short_001

+======= +

TP_Pos_060311_unsigned_short_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.10

+======= +

ES 201 873-9 [1], Clause 6.3.11

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +>>>>>>> generated ICS TP TSS +

Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+======= +

Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.31 Unsigned ShortA.2.32 Byte>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060311_unsigned_short_001

+======= +

TP_Pos_060312_byte_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.11

+======= +

ES 201 873-9 [1], Clause 6.3.12

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1]

+======= +

Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.32 ByteA.2.33 Unsigned byte>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060312_byte_001

+======= +

TP_Pos_060313_unsigned_byte_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.12

+======= +

ES 201 873-9 [1], Clause 6.3.13

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+======= +

Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.33 Unsigned byteA.2.34 Decimal>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060313_unsigned_byte_001

+======= +

TP_Pos_060401_decimal_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.3.13

+======= +

ES 201 873-9 [1], Clause 6.4.1

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1]

+======= +

Verify that decimal type shall be translated to TTCN-3 as a plain float

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.34 DecimalA.2.35 Float>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060401_decimal_001

+======= +

TP_Pos_060402_float_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.4.1

+======= +

ES 201 873-9 [1], Clause 6.4.2

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that decimal type shall be translated to TTCN-3 as a plain float

+======= +

Verify conversion of XSD float type

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.35 FloatA.2.36 Double>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060402_float_001

+======= +

TP_Pos_060403_double_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.4.2

+======= +

ES 201 873-9 [1], Clause 6.4.3

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify conversion of XSD float type

+======= +

Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]:

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.36 DoubleA.2.37 Date and time>>>>>> update +lang=EN-GB>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060403_double_001

+======= +

TP_Pos_060502_date_and_time_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.4.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]:

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.37 Date and time

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060502_date_and_time_001

+======= +

TP_Pos_060502_date_and_time_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060502_date_and_time_002

+======= +

TP_Pos_060502_date_and_time_003

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060502_date_and_time_003

+======= +

TP_Pos_060502_date_and_time_004

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060502_date_and_time_004

+======= +

TP_Neg_060502_date_and_time_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060502_date_and_time_001

+======= +

TP_Neg_060502_date_and_time_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060502_date_and_time_002

+======= +

TP_Neg_060502_date_and_time_003

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060502_date_and_time_003

+======= +

TP_Neg_060502_date_and_time_004

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.38 Date

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060502_date_and_time_004

+======= +

TP_Pos_060504_date_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.38 Date

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060504_date_001

+======= +

TP_Pos_060504_date_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060504_date_002

+======= +

TP_Pos_060504_date_003

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060504_date_003

+======= +

TP_Pos_060504_date_004

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060504_date_004

+======= +

TP_Neg_060504_date_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060504_date_001

+======= +

TP_Neg_060504_date_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060504_date_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060504_date_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060504_date_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.39 Gregorian year and month

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060505_gregorian_year_and_month_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060505_gregorian_year_and_month_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060505_gregorian_year_and_month_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060505_gregorian_year_and_month_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060505_gregorian_year_and_month_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_060505_gregorian_year_and_month_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.40 Gregorian year

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060506_gregorian_year_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_060506_gregorian_year_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060506_gregorian_year_003

+======= +

TP_Neg_060504_date_003

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.5.6

+======= +

ES 201 873-9 [1], Clause 6.5.4

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that the gYear allows positive years greater than 9999

+======= +

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060506_gregorian_year_004

+======= +

TP_Neg_060504_date_004

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.5.6

+======= +

ES 201 873-9 [1], Clause 6.5.4

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+======= +

Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.39 Gregorian year and month

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060506_gregorian_year_005

+======= +

TP_Pos_060505_gregorian_year_and_month_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYear accepts negative years

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_060506_gregorian_year_006

+======= +

TP_Pos_060505_gregorian_year_and_month_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYear alows negative year with more than 4 digits

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Neg_060506_gregorian_year_001

+======= +

TP_Neg_060505_gregorian_year_and_month_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.5.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.41 Boolean type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_0607_boolean_type_001

+======= +

TP_Neg_060505_gregorian_year_and_month_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_0607_boolean_type_002

+======= +

TP_Neg_060505_gregorian_year_and_month_003

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.7

+======= +

ES 201 873-9 [1], Clause 6.5.5

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+======= +

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.42 AnyType and anySimpleType types

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_0608_anytype_and_anysimpletype_types_001

+======= +

TP_Neg_060505_gregorian_year_and_month_004

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 6.8

+======= +

ES 201 873-9 [1], Clause 6.5.5

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify conversion of anySimpleType

+======= +

Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.40 Gregorian year

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_0608_anytype_and_anysimpletype_types_002

+======= +

TP_Pos_060506_gregorian_year_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify conversion of anyType

+======= +

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.43 Id

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070101_id_001

+======= +

TP_Pos_060506_gregorian_year_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of id attribute of global element

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070101_id_002

+======= +

TP_Pos_060506_gregorian_year_003

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

verify conversion of id attribute of local element

+======= +

Verify that the gYear allows positive years greater than 9999

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070101_id_001

+======= +

TP_Pos_060506_gregorian_year_004

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Verify conversion of id attribute of global element

+======= +

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070101_id_002

+======= +

TP_Pos_060506_gregorian_year_005

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

verify conversion of id attribute of local element

+======= +

Verify that the gYear accepts negative years

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+
+

A.2.44 MinOccurs and maxOccurs

+ +
+
>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_001

+======= +

TP_Pos_060506_gregorian_year_006

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.5.6

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+======= +

Verify that the gYear alows negative year with more than 4 digits

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_002

+======= +

TP_Neg_060506_gregorian_year_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.5.6

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+======= +

Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+ +

A.2.41 Boolean type

+ +
+
>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_003

+======= +

TP_Pos_0607_boolean_type_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.7

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

a list with minOccurs 0 should allow zero elements

+======= +

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_004

+======= +

TP_Pos_0607_boolean_type_002

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.7

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

A restricted length list (0, unbounded) should allow elements

+======= +

Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+ +

A.2.42 AnyType and anySimpleType types

+ +
+
>>>>>> update + style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt; + mso-yfti-tbllook:1184;mso-padding-alt:0cm 5.4pt 0cm 1.4pt;mso-prop-change: + schulzs 20100920T2038;mso-border-insideh:.5pt solid windowtext;mso-border-insidev: + .5pt solid windowtext;border-collapse:collapse !msorm;border:none !msorm; + mso-border-alt:solid windowtext .5pt !msorm;mso-yfti-tbllook:1184 !msorm; + mso-padding-alt:0cm 5.4pt 0cm 1.4pt !msorm'> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_005

+======= +

TP_Pos_0608_anytype_and_anysimpletype_types_001

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.8

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

A restricted length list [5, 10] should allow 5 elements

+======= +

Verify conversion of anySimpleType

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_006

+======= +

TP_Pos_0608_anytype_and_anysimpletype_types_002

+>>>>>>> update +
+

Reference

+
+<<<<<<< HEAD +

ES 201 873-9 [1], Clause 7.1.4

+======= +

ES 201 873-9 [1], Clause 6.8

+>>>>>>> update +
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

A restricted length list [5, 10] should allow 10 elements

+======= +

Verify conversion of anyType

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.43 Id

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_002

+======= +

TP_Pos_070101_id_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+======= +

Verify conversion of id attribute of global element

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_003

+======= +

TP_Pos_070101_id_002

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +

a list with minOccurs 0 should allow zero elements

+======= +

verify conversion of id attribute of local element

+>>>>>>> update +
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.44 MinOccurs and maxOccurs

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+<<<<<<< HEAD +

TP_Pos_070104_minoccurs_and_maxoccurs_004

+======= +

TP_Pos_070104_minoccurs_and_maxoccurs_001

+>>>>>>> update +
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+<<<<<<< HEAD +======= +

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

a list with minOccurs 0 should allow zero elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list (0, unbounded) should allow elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Optional field defined by minOccurs has to be mapped as optional in TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Optional field defined by minOccurs has to exist in TTCN-3 and match the value

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

a list with minOccurs 0 should allow zero elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+>>>>>>> update +

A restricted length list (0, unbounded) should allow elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 5 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 10 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070104_minoccurs_and_maxoccurs_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should allow 7 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

a list with minOccurs 0 should not be mapped optional in TTCN-3

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should not allow less than 5 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070104_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

A restricted length list [5, 10] should not allow more than 10 elements

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.45 Default and Fixed

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of fixed attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of default attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of fixed attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of default attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that default value is automatically assigned to empty element by decoder

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070105_default_and_fixed_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that fixed value is automatically assigned to empty element by decoder

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070105_default_and_fixed_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070105_default_and_fixed_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify constraint of type based on XSD definition with fixed attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.46 Form

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified attribute form is correctly converted (qualified attributeFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified element form is correctly converted (unqualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unqualified element form is correctly converted (qualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified element form is correctly converted (unqualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that qualified element form is correctly converted (qualified elementFormDefault)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+<<<<<<< HEAD +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_010

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_011

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070106_form_012

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070106_form_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070106_form_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for elementFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070106_form_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070106_form_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

check correct namespace prefix encoding for attributeFormDefault

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+======= +>>>>>>> generated ICS TP TSS +
+
+

A.2.47 Type

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing global complexType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing built-in type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing global simpleType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing global complexType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070107_type_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of type attribute referencing built-in type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.48 Use

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with required use is correctly converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with optional use is correctly converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with prohibited use is not converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with required use is correctly converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with optional use is correctly converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070112_use_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with prohibited use is not converted

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070112_use_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with required use cannot be omitted

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070112_use_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.12

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that attribute with required use cannot be omitted

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.49 Final

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070114_final_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.14

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of elements with final attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070114_final_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.1.14

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of elements with final attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.50 Element component

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0703_element_component_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of global element of simple type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0703_element_component_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of global element of user defined type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0703_element_component_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of global element of locally defined complex type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0703_element_component_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of local elements defined by reference with different namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.51 Attribute element definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070401_attribute_element_definitions_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.4.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a globally defined attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070401_attribute_element_definitions_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.4.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a globally defined attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.52 Attribute group definitions

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070402_attribute_group_definitions_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.4.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a globally defined attribute group

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070402_attribute_group_definitions_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.4.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a globally defined attribute group

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.53 Derivation by restriction

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070501_derivation_by_restriction_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that it is possible to convert anonymous

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.54 Derivation by list

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070502_derivation_by_list_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that derivation by list is converted to record of

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070502_derivation_by_list_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of facets connected applied to derivation by list

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070502_derivation_by_list_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of facets defined inside XSD list

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070502_derivation_by_list_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of derivation by list with enumerated facets inside

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070502_derivation_by_list_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of list containing union content

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070502_derivation_by_list_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify length constraint imposed on type derived by list

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_070502_derivation_by_list_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify constraint imposed on inner type defined inside XSD list

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.55 Derivation by union

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union with memberTypes attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union with unnamed member types

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union with memberTypes attribute and unnamed member types

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union with memberTypes attribute and unnamed enumeration

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union content containing enumeration facets

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070503_derivation_by_union_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of union containing list content

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.56 Extending simple content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060101_extending_simple_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify extension of a built-in type by adding an attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.57 Restricting simple content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060102_restricting_simple_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.1.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify restriction of a base type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_07060102_restricting_simple_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.1.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify restriction of a base type

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+

A.2.58 Complex content derived by extension

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and the

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and the

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and the

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and the

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and the

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where both the base and

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type where extension of a sequence

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type:

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060201_derived_by_extension_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex type:

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.59 Complex content derived by restriction

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060202_derived_by_restriction_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.2.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of complex content derived by restriction:

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.60 Referencing group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (sequence, one occurrence)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring inside sequence

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (sequence, optional occurrence)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (sequence, 0..N)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (all, one occurrence)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (all, 0..1)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (choice, one occurrence)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..1)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring as child of complex type (choice, 0..N)

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070603_referencing_group_components_010

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group reference occurring inside choice

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.61 All content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070604_all_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of all content containing mandatory fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070604_all_content_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of all content with minOccurs="0"

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070604_all_content_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of elements with minOccurs attribute occuring inside all content

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070604_all_content_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of all content containing attributes

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.62 Choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070605_top_level_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with minOccurs different than 1 is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070605_top_level_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with maxOccurs larger than 1 is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.63 Choice with nested elements

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060501_choice_with_nested_elements_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060501_choice_with_nested_elements_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested elements is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.64 Choice with nested group

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060502_choice_with_nested_group_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested group is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060502_choice_with_nested_group_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested group is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.65 Choice with nested choice

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060503_choice_with_nested_choice_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060503_choice_with_nested_choice_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested choice is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.66 Choice with nested sequence

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060504_choice_with_nested_sequence_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060504_choice_with_nested_sequence_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060504_choice_with_nested_sequence_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested sequence is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060504_choice_with_nested_sequence_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with multiple nested sequences is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.67 Choice with nested any

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060505_choice_with_nested_any_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested any is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060505_choice_with_nested_any_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.5.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that choice content with nested any is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.68 Sequence with nested element content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060601_sequence_with_nested_element_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060601_sequence_with_nested_element_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested elements is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.69 Sequence with nested group content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060602_sequence_with_nested_group_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060602_sequence_with_nested_group_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with group reference is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.70 Sequence with nested choice content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060603_sequence_with_nested_choice_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060603_sequence_with_nested_choice_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.3

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested choice is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.71 Sequence with nested sequence content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060604_sequence_with_nested_sequence_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060604_sequence_with_nested_sequence_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060604_sequence_with_nested_sequence_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with sequence is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060604_sequence_with_nested_sequence_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.4

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with various nested particles is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.72 Sequence with nested any content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060605_sequence_with_nested_any_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060605_sequence_with_nested_any_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.5

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequence content with nested any content is correctly transformed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.73 Effect of the minOccurs and maxOccurs attributes on the mapping

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequences with minOccurs=0 are correctly converted to optional fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that nested sequences are correctly converted to optional fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that sequences with minOccurs=unbounded are correctly converted to record of fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.6.6

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that nested sequences are correctly converted to record of fields

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.74 Attribute definitions, attribute and attributeGroup references

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify referencing an attributeGroup in a complexType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a local attributes, attribute references and attribute group references without a target namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.7

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify mapping of a local attributes, attribute references and attribute group references with a target namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.75 Mixed content

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070608_mixed_content_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of complex type with sequence constructor and mixed content type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070608_mixed_content_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of omplex type definition with sequence constructor of multiple occurrences and mixed content type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070608_mixed_content_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of complex type definition with all constructor and mixed content type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070608_mixed_content_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070608_mixed_content_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.6.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of complex type definition with all constructor, optional elements and mixed content type

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.76 The any element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element without namespace attribute

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element with ##any namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element with ##local namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element with ##other namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element with ##targetNamespace namespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070701_the_any_element_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of the any element with URL as namespace into record of

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.77 The anyAttribute element

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070702_the_anyattribute_element_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of anyAttribute element

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070702_the_anyattribute_element_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that anyAttribute is converted into optional field

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070702_the_anyattribute_element_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that the naming rules apply to converted anyAttribute field

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070702_the_anyattribute_element_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that conversion of anyAttribute present both in extended type and extension base

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_070702_the_anyattribute_element_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.7.2

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that converted anyAttribute field is in correct place

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.78 Annotation

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0708_annotation_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.8

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that XSD annotation can be processed

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.79 Group components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0709_group_components_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group definition with sequence compositor

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0709_group_components_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify transformation of group definition with sequence compositor

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0709_group_components_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.9

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify conversion of group definition with all compositor

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.80 Identity-constraint definition schema components

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that unique elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that key elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_0710_identity_constraint_definition_schema_components_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 7.10

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Verify that keyRef elements (and nested selector and field) are ignored during conversion

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.81 Head elements of substitution groups

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_080101_head_elements_of_substitution_groups_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause 8.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Generic substitution group example

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_080101_head_elements_of_substitution_groups_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause 8.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Show effect of the block and abstract attributes on element substitution

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_080101_head_elements_of_substitution_groups_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause 8.1.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Blocking substitution

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+
+

A.2.82 Annex A (normative): TTCN-3 module XSD

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type AnySimpleType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type AnyType

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type String

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NormalizedString

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Token

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Name

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NMTOKEN

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NCName

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type ID

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_010

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type IDREF

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_011

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type ENTITY

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_012

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type HexBinary

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_013

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Base64Binary

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_014

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type AnyURI

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_015

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Language

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_016

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Integer

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_017

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type PositiveInteger

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_018

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NonPositiveInteger

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_019

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NegativeInteger

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_020

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NonNegativeInteger

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_021

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Long

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_022

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedLong

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_023

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Int

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_024

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedInt

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_025

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Short

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_026

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedShort

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_027

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Byte

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_028

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type UnsignedByte

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_029

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Decimal

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_030

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Float

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_031

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Double

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_032

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Duration

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_033

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type DateTime

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_034

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Time

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_035

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Date

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_036

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type GYearMonth

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_037

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type GYear

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_038

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type GMonthDay

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_039

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type GDay

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_040

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type GMonth

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_041

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type NMTOKENS

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_042

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type IDREFS

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_043

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type ENTITIES

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_044

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type QName

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_045

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type Boolean

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_046

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLCompatibleString

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_047

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoWhitespace

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Pos_A_ttcn3_module_xsd_048

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoCRLFHT

+
+

Expected Output

+
+

The TTCN-3 module shall be accepted by the tool and all test cases have to produce the verdict pass after execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_001

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type AnySimpleType allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_002

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type AnyType allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_003

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type String allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_004

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NormalizedString allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_005

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Token allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_006

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Name allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_007

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NMTOKEN allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_008

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NCName allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_009

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type ID allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_010

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type IDREF allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_011

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type ENTITY allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_012

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type HexBinary allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_013

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Base64Binary allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_014

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type AnyURI allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_015

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Language allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_016

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Integer allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_017

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type PositiveInteger allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_018

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NonPositiveInteger allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_019

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NegativeInteger allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_020

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NonNegativeInteger allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_021

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Long allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_022

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type UnsignedLong allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_023

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Int allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_024

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type UnsignedInt allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_025

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Short allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_026

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type UnsignedShort allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_027

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Byte allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_028

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type UnsignedByte allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_029

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Decimal allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_030

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Float allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_031

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Double allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_032

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Duration allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_033

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type DateTime allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_034

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Time allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_035

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Date allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_036

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type GYearMonth allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_037

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type GYear allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_038

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type GMonthDay allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_039

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type GDay allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_040

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type GMonth allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_041

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type NMTOKENS allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_042

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type IDREFS allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_043

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type ENTITIES allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_044

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type QName allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_045

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type Boolean allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_046

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type XMLCompatibleString allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_047

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type XMLStringWithNoWhitespace allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_Neg_A_ttcn3_module_xsd_048

+
+

Reference

+
+

ES 201 873-9 [1], Clause A

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure the builtin XSD type XMLStringWithNoCRLFHT allows only valid values

+
+

Expected Output

+
+

The TTCN-3 module shall be rejected by the validator or after/during execution.

+
+

Notes

+
+

+
+
+
+ +

 

+ +
+ + + + \ No newline at end of file diff --git a/Docs/deliverable/stf475-tss.html b/Docs/deliverable/stf475-tss.html new file mode 100644 index 0000000000000000000000000000000000000000..307eaac8b27d7917a69be426424245e9601d4e7a --- /dev/null +++ b/Docs/deliverable/stf475-tss.html @@ -0,0 +1,4214 @@ + + + + + + + + + + + + + + + + + + +
+ + +

Table B.1: Test suite structure, positive tests

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

5 Mapping XML Schemas

+
+

5.1.1 Namespaces

+
+

Pos_050101_namespaces_001

+
+

Pos_050101_namespaces_002

+
+

Pos_050101_namespaces_003

+
+

Pos_050101_namespaces_004

+
+

5.1.2 Includes

+
+

Pos_050102_includes_001

+
+

Pos_050102_includes_002

+
+

Pos_050102_includes_003

+
+

5.1.3 Imports

+
+

Pos_050103_imports_001

+
+

5.1.4 Attributes of the XSD schema element

+
+

Pos_050104_attributes_of_the_xsd_schema_element_001

+
+

Pos_050104_attributes_of_the_xsd_schema_element_002

+
+

Pos_050104_attributes_of_the_xsd_schema_element_003

+
+

Pos_050104_attributes_of_the_xsd_schema_element_004

+
+

Pos_050104_attributes_of_the_xsd_schema_element_005

+
+

Pos_050104_attributes_of_the_xsd_schema_element_006

+
+

5.2.2 Name conversion rules

+
+

Pos_050202_name_conversion_rules_001

+
+

Pos_050202_name_conversion_rules_002

+
+

Pos_050202_name_conversion_rules_003

+
+

Pos_050202_name_conversion_rules_004

+
+

Pos_050202_name_conversion_rules_005

+
+

Pos_050202_name_conversion_rules_006

+
+

Pos_050202_name_conversion_rules_007

+
+

Pos_050202_name_conversion_rules_008

+
+

Pos_050202_name_conversion_rules_009

+
+

Pos_050202_name_conversion_rules_010

+
+

Pos_050202_name_conversion_rules_011

+
+

Pos_050202_name_conversion_rules_012

+
+

Pos_050202_name_conversion_rules_013

+
+

Pos_050202_name_conversion_rules_014

+
+

Pos_050202_name_conversion_rules_015

+
+

Pos_050202_name_conversion_rules_016

+
+

Pos_050202_name_conversion_rules_017

+
+

Pos_050202_name_conversion_rules_018

+
+

Pos_050202_name_conversion_rules_019

+
+

Pos_050202_name_conversion_rules_020

+
+

Pos_050202_name_conversion_rules_021

+
+

Pos_050202_name_conversion_rules_022

+
+

Pos_050202_name_conversion_rules_023

+
+

5.2.3 Order of the mapping

+
+

Pos_050203_order_of_the_mapping_001

+
+

Pos_050203_order_of_the_mapping_002

+
+

Pos_050203_order_of_the_mapping_003

+
+

Pos_050203_order_of_the_mapping_004

+
+

Pos_050203_order_of_the_mapping_005

+
>>>>>> generated ICS TP TSS +======= + +

6 Built-in data types

+
+

Top level

+
+

Pos_06_top_level_001

+
+

6.1.1 Length

+
+

Pos_060101_length_001

+
+

Pos_060101_length_002

+
+

6.1.5 Enumeration

+
+

Pos_060105_enumeration_001

+
+

Pos_060105_enumeration_002

+
+

Pos_060105_enumeration_003

+
+

Pos_060105_enumeration_004

+
+

Pos_060105_enumeration_005

+
+

Pos_060105_enumeration_006

+
+

6.1.5 Enumeration

+
+

Pos_060105_enumeration_001

+
+

Pos_060105_enumeration_002

+
+

Pos_060105_enumeration_003

+
+

Pos_060105_enumeration_004

+
+

Pos_060105_enumeration_005

+
+

Pos_060105_enumeration_006

+
+

6.1.7 MinInclusive

+
+

Pos_060107_mininclusive_001

+
+

Pos_060107_mininclusive_002

+
+

Pos_060107_mininclusive_003

+
+

Pos_060107_mininclusive_004

+
+

Pos_060107_mininclusive_005

+
+

6.1.8 MaxInclusive

+
+

Pos_060108_maxinclusive_001

+
+

Pos_060108_maxinclusive_002

+
+

Pos_060108_maxinclusive_003

+
+

Pos_060108_maxinclusive_004

+
+

6.1.9 MinExclusive

+
+

Pos_060109_minexclusive_001

+
+

Pos_060109_minexclusive_002

+
+

6.1.10 MaxExclusive

+
+

Pos_060110_maxexclusive_001

+
+

Pos_060110_maxexclusive_002

+
+

Pos_060110_maxexclusive_003

+
+

6.1.11 Total digits

+
+

Pos_060111_total_digits_001

+
+

Pos_060111_total_digits_002

+
+

Pos_060111_total_digits_003

+
+

Pos_060111_total_digits_004

+
+

Pos_060111_total_digits_005

+
+

6.1.12 Fraction digits

+
+

Pos_060112_fraction_digits_001

+
+

Pos_060112_fraction_digits_002

+
+

6.1.13 Not specifically mapped facets

+
+

Pos_060113_not_mapped_001

+
+

6.2.1 String

+
+

Pos_060201_string_001

+
+

6.2.4 Name

+
+

Pos_060204_name_001

+
+

6.2.12 Any URI

+
+

Pos_060212_any_uri_001

+
+

6.3.1 Integer

+
+

Pos_060301_integer_001

+
+

6.3.2 Positive integer

+
+

Pos_060302_positive_integer_001

+
+

6.3.3 Non-positive integer

+
+

Pos_060303_non_positive_integer_001

+
+

6.3.4 Negative integer

+
+

Pos_060304_negative_integer_001

+
+

6.3.5 Non-negative integer

+
+

Pos_060305_non_negative_integer_001

+
+

6.3.6 Long

+
+

Pos_060306_long_001

+
+

6.3.7 Unsigned long

+
+

Pos_060307_unsigned_long_001

+
+

6.3.8 Int

+
+

Pos_060308_int_001

+
+

6.3.9 Unsigned int

+
+

Pos_060309_unsigned_int_001

+
+

6.3.10 Short

+
+

Pos_060310_short_001

+
+

6.3.11 Unsigned Short

+
+

Pos_060311_unsigned_short_001

+
+

6.3.12 Byte

+
+

Pos_060312_byte_001

+
+

6.3.13 Unsigned byte

+
+

Pos_060313_unsigned_byte_001

+
+

6.4.1 Decimal

+
+

Pos_060401_decimal_001

+
+

6.4.2 Float

+
+

Pos_060402_float_001

+
+

6.4.3 Double

+
+

Pos_060403_double_001

+
+

6.5.2 Date and time

+
+

Pos_060502_date_and_time_001

+
+

Pos_060502_date_and_time_002

+
+

Pos_060502_date_and_time_003

+
+

Pos_060502_date_and_time_004

+
+

6.5.4 Date

+
+

Pos_060504_date_001

+
+

Pos_060504_date_002

+
+

Pos_060504_date_003

+
+

Pos_060504_date_004

+
+

6.5.5 Gregorian year and month

+
+

Pos_060505_gregorian_year_and_month_001

+
+

Pos_060505_gregorian_year_and_month_002

+
+

6.5.6 Gregorian year

+
+

Pos_060506_gregorian_year_001

+
+

Pos_060506_gregorian_year_002

+
+

Pos_060506_gregorian_year_003

+
+

Pos_060506_gregorian_year_004

+
+

Pos_060506_gregorian_year_005

+
+

Pos_060506_gregorian_year_006

+
+

6.7 Boolean type

+
+

Pos_0607_boolean_type_001

+
+

Pos_0607_boolean_type_002

+
+

6.8 AnyType and anySimpleType types

+
+

Pos_0608_anytype_and_anysimpletype_types_001

+
+

Pos_0608_anytype_and_anysimpletype_types_002

+
>>>>>> generated ICS TP TSS +======= + +

7 Mapping XSD components

+
+

7.1.1 Id

+
+

Pos_070101_id_001

+
+

Pos_070101_id_002

+<<<<<<< HEAD +======= +
+

Pos_070101_id_001

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070101_id_001

+======= +

Pos_070101_id_002

+
+

7.1.4 MinOccurs and maxOccurs

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070101_id_002

+
+

7.1.4 MinOccurs and maxOccurs

+======= +

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070104_minoccurs_and_maxoccurs_001

+======= +

Pos_070104_minoccurs_and_maxoccurs_003

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070104_minoccurs_and_maxoccurs_002

+======= +

Pos_070104_minoccurs_and_maxoccurs_004

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070104_minoccurs_and_maxoccurs_003

+======= +

Pos_070104_minoccurs_and_maxoccurs_005

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070104_minoccurs_and_maxoccurs_004

+======= +

Pos_070104_minoccurs_and_maxoccurs_006

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070104_minoccurs_and_maxoccurs_005

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+======= +>>>>>>> generated ICS TP TSS +

Pos_070104_minoccurs_and_maxoccurs_007

+
+

Pos_070104_minoccurs_and_maxoccurs_001

+
+

Pos_070104_minoccurs_and_maxoccurs_002

+
+

Pos_070104_minoccurs_and_maxoccurs_003

+
+

Pos_070104_minoccurs_and_maxoccurs_004

+
+

Pos_070104_minoccurs_and_maxoccurs_005

+
+

Pos_070104_minoccurs_and_maxoccurs_006

+
+

Pos_070104_minoccurs_and_maxoccurs_007

+
+

7.1.5 Default and Fixed

+
+

Pos_070105_default_and_fixed_001

+
+

Pos_070105_default_and_fixed_002

+
+

Pos_070105_default_and_fixed_003

+
+

Pos_070105_default_and_fixed_004

+
+

Pos_070105_default_and_fixed_001

+
+

Pos_070105_default_and_fixed_002

+
+

Pos_070105_default_and_fixed_003

+
+

Pos_070105_default_and_fixed_004

+<<<<<<< HEAD +======= +
+

7.1.6 Form

+
+

Pos_070106_form_001

+
+

Pos_070106_form_002

+
+

Pos_070106_form_003

+
+

Pos_070106_form_004

+
+

Pos_070106_form_005

+
+

Pos_070106_form_006

+
+

Pos_070106_form_007

+
+

Pos_070106_form_008

+
+

Pos_070106_form_001

+
+

Pos_070106_form_002

+
+

Pos_070106_form_003

+
+

Pos_070106_form_004

+
+

Pos_070106_form_005

+
+

Pos_070106_form_006

+
+

Pos_070106_form_007

+
+

Pos_070106_form_008

+
+

Pos_070106_form_009

+
+

Pos_070106_form_010

+
+

Pos_070106_form_011

+
+

Pos_070106_form_012

+
+

7.1.7 Type

+
+

Pos_070107_type_001

+
+

Pos_070107_type_002

+
+

Pos_070107_type_003

+
+

Pos_070107_type_001

+
+

Pos_070107_type_002

+
+

Pos_070107_type_003

+
+

7.1.12 Use

+
+

Pos_070112_use_001

+
+

Pos_070112_use_002

+
+

Pos_070112_use_003

+
+

Pos_070112_use_001

+
+

Pos_070112_use_002

+
+

Pos_070112_use_003

+
+

7.1.14 Final

+
+

Pos_070114_final_001

+
+

Pos_070114_final_001

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

7.1.6 Form

+======= +

7.3 Element component

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070106_form_001

+======= +

Pos_0703_element_component_001

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070106_form_002

+======= +

Pos_0703_element_component_002

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070106_form_003

+======= +

Pos_0703_element_component_003

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070106_form_004

+
+

Pos_070106_form_005

+
+

Pos_070106_form_006

+
+

Pos_070106_form_007

+
+

Pos_070106_form_008

+
+

Pos_070106_form_001

+
+

Pos_070106_form_002

+
+

Pos_070106_form_003

+
+

Pos_070106_form_004

+
+

Pos_070106_form_005

+
+

Pos_070106_form_006

+
+

Pos_070106_form_007

+
+

Pos_070106_form_008

+
+

Pos_070106_form_009

+
+

Pos_070106_form_010

+
+

Pos_070106_form_011

+
+

Pos_070106_form_012

+
Pos_0703_element_component_004

+
+<<<<<<< HEAD +

7.1.7 Type

+======= +

7.4.1 Attribute element definitions

+>>>>>>> generated ICS TP TSS +
+<<<<<<< HEAD +

Pos_070107_type_001

+
+

Pos_070107_type_002

+
+

Pos_070107_type_003

+
+

Pos_070107_type_001

+
+

Pos_070107_type_002

+
+

Pos_070107_type_003

+
+

7.1.12 Use

+
+

Pos_070112_use_001

+
+

Pos_070112_use_002

+
+

Pos_070112_use_003

+
+

Pos_070112_use_001

+
+

Pos_070112_use_002

+
+

Pos_070112_use_003

+
+

7.1.14 Final

+
+

Pos_070114_final_001

+
+

Pos_070114_final_001

+
+

7.3 Element component

+
+

Pos_0703_element_component_001

+
+

Pos_0703_element_component_002

+
+

Pos_0703_element_component_003

+
+

Pos_0703_element_component_004

+
+

7.4.1 Attribute element definitions

+
+======= +>>>>>>> generated ICS TP TSS +

Pos_070401_attribute_element_definitions_001

+
+

Pos_070401_attribute_element_definitions_001

+
+

7.4.2 Attribute group definitions

+
+

Pos_070402_attribute_group_definitions_001

+
+

Pos_070402_attribute_group_definitions_001

+
+

7.5.1 Derivation by restriction

+
+

Pos_070501_derivation_by_restriction_001

+
+

7.5.2 Derivation by list

+
+

Pos_070502_derivation_by_list_001

+
+

Pos_070502_derivation_by_list_002

+
+

Pos_070502_derivation_by_list_003

+
+

Pos_070502_derivation_by_list_004

+
+

Pos_070502_derivation_by_list_005

+
+

7.5.3 Derivation by union

+
+

Pos_070503_derivation_by_union_001

+
+

Pos_070503_derivation_by_union_002

+
+

Pos_070503_derivation_by_union_003

+
+

Pos_070503_derivation_by_union_004

+
+

Pos_070503_derivation_by_union_005

+
+

Pos_070503_derivation_by_union_006

+
+

7.6.1.1 Extending simple content

+
+

Pos_07060101_extending_simple_content_001

+
+

7.6.1.2 Restricting simple content

+
+

Pos_07060102_restricting_simple_content_001

+
+

7.6.2.1 Complex content derived by extension

+
+

Pos_07060201_derived_by_extension_001

+
+

Pos_07060201_derived_by_extension_002

+
+

Pos_07060201_derived_by_extension_003

+
+

Pos_07060201_derived_by_extension_004

+
+

Pos_07060201_derived_by_extension_005

+
+

Pos_07060201_derived_by_extension_006

+
+

Pos_07060201_derived_by_extension_007

+
+

Pos_07060201_derived_by_extension_008

+
+

Pos_07060201_derived_by_extension_009

+
+

7.6.2.2 Complex content derived by restriction

+
+

Pos_07060202_derived_by_restriction_001

+
+

7.6.3 Referencing group components

+
+

Pos_070603_referencing_group_components_001

+
+

Pos_070603_referencing_group_components_002

+
+

Pos_070603_referencing_group_components_003

+
+

Pos_070603_referencing_group_components_004

+
+

Pos_070603_referencing_group_components_005

+
+

Pos_070603_referencing_group_components_006

+
+

Pos_070603_referencing_group_components_007

+
+

Pos_070603_referencing_group_components_008

+
+

Pos_070603_referencing_group_components_009

+
+

Pos_070603_referencing_group_components_010

+
+

7.6.4 All content

+
+

Pos_070604_all_content_001

+
+

Pos_070604_all_content_002

+
+

Pos_070604_all_content_003

+
+

Pos_070604_all_content_004

+
+

7.6.5 Choice content

+
+

Pos_070605_top_level_001

+
+

Pos_070605_top_level_002

+
+

7.6.5.1 Choice with nested elements

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

Pos_07060501_choice_with_nested_elements_001

+
+

7.6.5.2 Choice with nested group

+
+

Pos_07060502_choice_with_nested_group_001

+
+

Pos_07060502_choice_with_nested_group_001

+
+

7.6.5.3 Choice with nested choice

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

Pos_07060503_choice_with_nested_choice_001

+
+

7.6.5.4 Choice with nested sequence

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

Pos_07060504_choice_with_nested_sequence_001

+
+

Pos_07060504_choice_with_nested_sequence_002

+
+

7.6.5.5 Choice with nested any

+
+

Pos_07060505_choice_with_nested_any_001

+
+

Pos_07060505_choice_with_nested_any_001

+
+

7.6.6.1 Sequence with nested element content

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

Pos_07060601_sequence_with_nested_element_001

+
+

7.6.6.2 Sequence with nested group content

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

Pos_07060602_sequence_with_nested_group_001

+
+

7.6.6.3 Sequence with nested choice content

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

Pos_07060603_sequence_with_nested_choice_001

+
+

7.6.6.4 Sequence with nested sequence content

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

Pos_07060604_sequence_with_nested_sequence_001

+
+

Pos_07060604_sequence_with_nested_sequence_002

+
+

7.6.6.5 Sequence with nested any content

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

Pos_07060605_sequence_with_nested_any_content_001

+
+

7.6.6.6 Effect of the minOccurs and maxOccurs attributes on the mapping

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_001

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_002

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_003

+
+

Pos_07060606_effect_of_minoccurs_and_maxoccurs_004

+
+

7.6.7 Attribute definitions, attribute and attributeGroup references

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002

+
+

Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003

+
+

7.6.8 Mixed content

+
+

Pos_070608_mixed_content_001

+
+

Pos_070608_mixed_content_002

+
+

Pos_070608_mixed_content_003

+
+

Pos_070608_mixed_content_004

+
+

Pos_070608_mixed_content_005

+
+

7.7.1 The any element

+
+

Pos_070701_the_any_element_001

+
+

Pos_070701_the_any_element_002

+
+

Pos_070701_the_any_element_003

+
+

Pos_070701_the_any_element_004

+
+

Pos_070701_the_any_element_005

+
+

Pos_070701_the_any_element_006

+
+

7.7.2 The anyAttribute element

+
+

Pos_070702_the_anyattribute_element_001

+
+

Pos_070702_the_anyattribute_element_002

+
+

Pos_070702_the_anyattribute_element_003

+
+

Pos_070702_the_anyattribute_element_004

+
+

Pos_070702_the_anyattribute_element_005

+
+

7.8 Annotation

+
+

Pos_0708_annotation_001

+
+

7.9 Group components

+
+

Pos_0709_group_components_001

+
+

Pos_0709_group_components_002

+
+

Pos_0709_group_components_003

+
+

7.10 Identity-constraint definition schema components

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

Pos_0710_identity_constraint_definition_schema_components_001

+
+

Pos_0710_identity_constraint_definition_schema_components_002

+
+

Pos_0710_identity_constraint_definition_schema_components_003

+
+

8 Substitutions

+
+

8.1.1 Head elements of substitution groups

+
+

Pos_080101_head_elements_of_substitution_groups_001

+
+

Pos_080101_head_elements_of_substitution_groups_002

+
+

Pos_080101_head_elements_of_substitution_groups_003

+
+

A Annex A (normative): TTCN-3 module XSD

+
+

Top level

+
+

Pos_A_ttcn3_module_xsd_001

+
+

Pos_A_ttcn3_module_xsd_002

+
+

Pos_A_ttcn3_module_xsd_003

+
+

Pos_A_ttcn3_module_xsd_004

+
+

Pos_A_ttcn3_module_xsd_005

+
+

Pos_A_ttcn3_module_xsd_006

+
+

Pos_A_ttcn3_module_xsd_007

+
+

Pos_A_ttcn3_module_xsd_008

+
+

Pos_A_ttcn3_module_xsd_009

+
+

Pos_A_ttcn3_module_xsd_010

+
+

Pos_A_ttcn3_module_xsd_011

+
+

Pos_A_ttcn3_module_xsd_012

+
+

Pos_A_ttcn3_module_xsd_013

+
+

Pos_A_ttcn3_module_xsd_014

+
+

Pos_A_ttcn3_module_xsd_015

+
+

Pos_A_ttcn3_module_xsd_016

+
+

Pos_A_ttcn3_module_xsd_017

+
+

Pos_A_ttcn3_module_xsd_018

+
+

Pos_A_ttcn3_module_xsd_019

+
+

Pos_A_ttcn3_module_xsd_020

+
+

Pos_A_ttcn3_module_xsd_021

+
+

Pos_A_ttcn3_module_xsd_022

+
+

Pos_A_ttcn3_module_xsd_023

+
+

Pos_A_ttcn3_module_xsd_024

+
+

Pos_A_ttcn3_module_xsd_025

+
+

Pos_A_ttcn3_module_xsd_026

+
+

Pos_A_ttcn3_module_xsd_027

+
+

Pos_A_ttcn3_module_xsd_028

+
+

Pos_A_ttcn3_module_xsd_029

+
+

Pos_A_ttcn3_module_xsd_030

+
+

Pos_A_ttcn3_module_xsd_031

+
+

Pos_A_ttcn3_module_xsd_032

+
+

Pos_A_ttcn3_module_xsd_033

+
+

Pos_A_ttcn3_module_xsd_034

+
+

Pos_A_ttcn3_module_xsd_035

+
+

Pos_A_ttcn3_module_xsd_036

+
+

Pos_A_ttcn3_module_xsd_037

+
+

Pos_A_ttcn3_module_xsd_038

+
+

Pos_A_ttcn3_module_xsd_039

+
+

Pos_A_ttcn3_module_xsd_040

+
+

Pos_A_ttcn3_module_xsd_041

+
+

Pos_A_ttcn3_module_xsd_042

+
+

Pos_A_ttcn3_module_xsd_043

+
+

Pos_A_ttcn3_module_xsd_044

+
+

Pos_A_ttcn3_module_xsd_045

+
+

Pos_A_ttcn3_module_xsd_046

+
+

Pos_A_ttcn3_module_xsd_047

+
+

Pos_A_ttcn3_module_xsd_048

+
+ +
+

Table B.2: Test suite structure, negative tests

+ +
+ + + + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD + + + + +<<<<<<< HEAD +<<<<<<< HEAD + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> update + + +<<<<<<< HEAD +======= +>>>>>>> generated ICS TP TSS +======= +>>>>>>> update + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD + + + + + + + + + + + + + + + + + + + +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> update + + + + + + + + + +<<<<<<< HEAD +======= +>>>>>>> generated ICS TP TSS +======= +>>>>>>> update + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

5 Mapping XML Schemas

+
+

Top level

+
+

Neg_05_top_level_001

+
+

5.1.3 Imports

+
+

Neg_050103_imports_001

+
>>>>>> generated ICS TP TSS +======= + +

6 Built-in data types

+
+

6.1.1 Length

+
+

Neg_060101_length_001

+
>>>>>> generated ICS TP TSS +======= + +

6.1.5 Enumeration

+
+

Neg_060105_enumeration_001

+
+

Neg_060105_enumeration_002

+
+

Neg_060105_enumeration_003

+
+

Neg_060105_enumeration_004

+
+

6.1.9 MinExclusive

+
+

Neg_060109_minexclusive_001

+
+

Neg_060109_minexclusive_002

+
+

6.1.10 MaxExclusive

+
+

Neg_060110_maxexclusive_001

+
+

6.1.11 Total digits

+
+

Neg_060111_total_digits_001

+
+

Neg_060111_total_digits_002

+
+

Neg_060111_total_digits_003

+
+

Neg_060111_total_digits_004

+
+

6.2.12 Any URI

+
+

Neg_060212_any_uri_001

+
+

Neg_060212_any_uri_002

+
+

6.5.2 Date and time

+
+

Neg_060502_date_and_time_001

+
+

Neg_060502_date_and_time_002

+
+

Neg_060502_date_and_time_003

+
+

Neg_060502_date_and_time_004

+
+

6.5.4 Date

+
+

Neg_060504_date_001

+
+

Neg_060504_date_002

+
+

Neg_060504_date_003

+
+

Neg_060504_date_004

+
+

6.5.5 Gregorian year and month

+
+

Neg_060505_gregorian_year_and_month_001

+
+

Neg_060505_gregorian_year_and_month_002

+
+

Neg_060505_gregorian_year_and_month_003

+
+

Neg_060505_gregorian_year_and_month_004

+
+

6.5.6 Gregorian year

+
+

Neg_060506_gregorian_year_001

+
>>>>>> generated ICS TP TSS +======= + +

7 Mapping XSD components

+
+

7.1.4 MinOccurs and maxOccurs

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

Neg_070104_minoccurs_and_maxoccurs_001

+
+

Neg_070104_minoccurs_and_maxoccurs_002

+
+

Neg_070104_minoccurs_and_maxoccurs_003

+
+

7.1.5 Default and Fixed

+
+

Neg_070105_default_and_fixed_001

+
+

Neg_070105_default_and_fixed_001

+
+

7.1.6 Form

+
+

Neg_070106_form_001

+
+

Neg_070106_form_002

+
+

Neg_070106_form_003

+
+

Neg_070106_form_004

+
+

7.1.12 Use

+
+

Neg_070112_use_001

+
+

Neg_070112_use_001

+
+

7.5.2 Derivation by list

+
+

Neg_070502_derivation_by_list_001

+
+

Neg_070502_derivation_by_list_002

+
+

7.6.1.2 Restricting simple content

+
+

Neg_07060102_restricting_simple_content_001

+
+

A Annex A (normative): TTCN-3 module XSD

+
+

Top level

+
+

Neg_A_ttcn3_module_xsd_001

+
+

Neg_A_ttcn3_module_xsd_002

+
+

Neg_A_ttcn3_module_xsd_003

+
+

Neg_A_ttcn3_module_xsd_004

+
+

Neg_A_ttcn3_module_xsd_005

+
+

Neg_A_ttcn3_module_xsd_006

+
+

Neg_A_ttcn3_module_xsd_007

+
+

Neg_A_ttcn3_module_xsd_008

+
+

Neg_A_ttcn3_module_xsd_009

+
+

Neg_A_ttcn3_module_xsd_010

+
+

Neg_A_ttcn3_module_xsd_011

+
+

Neg_A_ttcn3_module_xsd_012

+
+

Neg_A_ttcn3_module_xsd_013

+
+

Neg_A_ttcn3_module_xsd_014

+
+

Neg_A_ttcn3_module_xsd_015

+
+

Neg_A_ttcn3_module_xsd_016

+
+

Neg_A_ttcn3_module_xsd_017

+
+

Neg_A_ttcn3_module_xsd_018

+
+

Neg_A_ttcn3_module_xsd_019

+
+

Neg_A_ttcn3_module_xsd_020

+
+

Neg_A_ttcn3_module_xsd_021

+
+

Neg_A_ttcn3_module_xsd_022

+
+

Neg_A_ttcn3_module_xsd_023

+
+

Neg_A_ttcn3_module_xsd_024

+
+

Neg_A_ttcn3_module_xsd_025

+
+

Neg_A_ttcn3_module_xsd_026

+
+

Neg_A_ttcn3_module_xsd_027

+
+

Neg_A_ttcn3_module_xsd_028

+
+

Neg_A_ttcn3_module_xsd_029

+
+

Neg_A_ttcn3_module_xsd_030

+
+

Neg_A_ttcn3_module_xsd_031

+
+

Neg_A_ttcn3_module_xsd_032

+
+

Neg_A_ttcn3_module_xsd_033

+
+

Neg_A_ttcn3_module_xsd_034

+
+

Neg_A_ttcn3_module_xsd_035

+
+

Neg_A_ttcn3_module_xsd_036

+
+

Neg_A_ttcn3_module_xsd_037

+
+

Neg_A_ttcn3_module_xsd_038

+
+

Neg_A_ttcn3_module_xsd_039

+
+

Neg_A_ttcn3_module_xsd_040

+
+

Neg_A_ttcn3_module_xsd_041

+
+

Neg_A_ttcn3_module_xsd_042

+
+

Neg_A_ttcn3_module_xsd_043

+
+

Neg_A_ttcn3_module_xsd_044

+
+

Neg_A_ttcn3_module_xsd_045

+
+

Neg_A_ttcn3_module_xsd_046

+
+

Neg_A_ttcn3_module_xsd_047

+
+

Neg_A_ttcn3_module_xsd_048

+
+ +

 

+ +

 

+ +
+ + + + \ No newline at end of file diff --git a/standards/4.5.1/es_20187309v040501p.doc b/standards/4.5.1/es_20187309v040501p.doc new file mode 100644 index 0000000000000000000000000000000000000000..d7d2dd1935f6946ee96d5c41aea7ddfb84264784 Binary files /dev/null and b/standards/4.5.1/es_20187309v040501p.doc differ diff --git a/tools/NewTestCasePlugin/feature/.project b/tools/NewTestCasePlugin/feature/.project new file mode 100644 index 0000000000000000000000000000000000000000..b87ac92e6dd8a5de7c4b9362fc5f6e8860864c6d --- /dev/null +++ b/tools/NewTestCasePlugin/feature/.project @@ -0,0 +1,17 @@ + + + NewTestCaseFeature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/tools/NewTestCasePlugin/feature/build.properties b/tools/NewTestCasePlugin/feature/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..64f93a9f0b7328eb563aa5ad6cec7f828020e124 --- /dev/null +++ b/tools/NewTestCasePlugin/feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/tools/NewTestCasePlugin/feature/feature.xml b/tools/NewTestCasePlugin/feature/feature.xml new file mode 100644 index 0000000000000000000000000000000000000000..814fe37bff1041e84aed436f05aac83321f6d793 --- /dev/null +++ b/tools/NewTestCasePlugin/feature/feature.xml @@ -0,0 +1,27 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + diff --git a/tools/NewTestCasePlugin/plugin/.classpath b/tools/NewTestCasePlugin/plugin/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..64c5e31b7a264082f4c1dfdabb8097de820e66ce --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/NewTestCasePlugin/plugin/.project b/tools/NewTestCasePlugin/plugin/.project new file mode 100644 index 0000000000000000000000000000000000000000..ceeb05f570b0e94296e98fb5892248277148b0dd --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/.project @@ -0,0 +1,28 @@ + + + NewTestCase + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/tools/NewTestCasePlugin/plugin/.settings/org.eclipse.jdt.core.prefs b/tools/NewTestCasePlugin/plugin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..416f4fb696076006767f4e4ec37e74612a7fbd34 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/tools/NewTestCasePlugin/plugin/META-INF/MANIFEST.MF b/tools/NewTestCasePlugin/plugin/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..ee18c7e6f31c70331155e5179343a725855878bf --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: New Test Case +Bundle-SymbolicName: org.etsi.mts.ttcn3.part9.newTestCase;singleton:=true +Bundle-Version: 0.0.5.qualifier +Bundle-Activator: org.etsi.mts.ttcn3.part9.popup.actions.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Vendor: STF 475 diff --git a/tools/NewTestCasePlugin/plugin/build.properties b/tools/NewTestCasePlugin/plugin/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..0d3d3a745d49c12500fb77bdc372b76e8bf624de --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/ diff --git a/tools/NewTestCasePlugin/plugin/icons/sample.gif b/tools/NewTestCasePlugin/plugin/icons/sample.gif new file mode 100644 index 0000000000000000000000000000000000000000..34fb3c9d8cb7d489681b7f7aee4bdcd7eaf53610 Binary files /dev/null and b/tools/NewTestCasePlugin/plugin/icons/sample.gif differ diff --git a/tools/NewTestCasePlugin/plugin/plugin.xml b/tools/NewTestCasePlugin/plugin/plugin.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7eda2aff06c199424f889cd0ce88b5b248692c3 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/plugin.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/CommandHandler.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/CommandHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..b837c0c0228ab704a8eb06f06864fd213c2b6bd5 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/CommandHandler.java @@ -0,0 +1,34 @@ +package org.etsi.mts.ttcn3.part9.newtestcase.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.jface.dialogs.MessageDialog; + +/** + * Our sample handler extends AbstractHandler, an IHandler base class. + * @see org.eclipse.core.commands.IHandler + * @see org.eclipse.core.commands.AbstractHandler + */ +public class CommandHandler extends AbstractHandler { + /** + * The constructor. + */ + public CommandHandler() { + } + + /** + * the command has been executed, so extract extract the needed information + * from the application context. + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); + MessageDialog.openInformation( + window.getShell(), + "New Test Case", + "Try Me!"); + return null; + } +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewNegativeTestCaseHandler.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewNegativeTestCaseHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..619200acda423b2b7ee67e7052dc84adb9f8d6f6 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewNegativeTestCaseHandler.java @@ -0,0 +1,24 @@ +package org.etsi.mts.ttcn3.part9.newtestcase.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.etsi.mts.ttcn3.part9.popup.actions.NewNegativeTestCase; +import org.etsi.mts.ttcn3.part9.popup.actions.NewTestCase; + +/** + * Our sample handler extends AbstractHandler, an IHandler base class. + * @see org.eclipse.core.commands.IHandler + * @see org.eclipse.core.commands.AbstractHandler + */ +public class NewNegativeTestCaseHandler extends AbstractHandler { + /** + * the command has been executed, so extract extract the needed information + * from the application context. + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + NewTestCase tc = new NewNegativeTestCase(); + tc.runAsCommand(); + return null; + } +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewPositiveTestCaseHandler.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewPositiveTestCaseHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..b3bbb295b401db8683bd1b869e3b9e39e7a1cca7 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/newtestcase/handlers/NewPositiveTestCaseHandler.java @@ -0,0 +1,24 @@ +package org.etsi.mts.ttcn3.part9.newtestcase.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.etsi.mts.ttcn3.part9.popup.actions.NewPositiveTestCase; +import org.etsi.mts.ttcn3.part9.popup.actions.NewTestCase; + +/** + * Our sample handler extends AbstractHandler, an IHandler base class. + * @see org.eclipse.core.commands.IHandler + * @see org.eclipse.core.commands.AbstractHandler + */ +public class NewPositiveTestCaseHandler extends AbstractHandler { + /** + * the command has been executed, so extract extract the needed information + * from the application context. + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + NewTestCase tc = new NewPositiveTestCase(); + tc.runAsCommand(); + return null; + } +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/Activator.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/Activator.java new file mode 100644 index 0000000000000000000000000000000000000000..0190b3b5ddce497b497eb3188cba7e8462cac510 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/Activator.java @@ -0,0 +1,62 @@ +package org.etsi.mts.ttcn3.part9.popup.actions; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "NewTestCase"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewNegativeTestCase.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewNegativeTestCase.java new file mode 100644 index 0000000000000000000000000000000000000000..f7b1e3147204b516555c2ca363ac40a830cc249c --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewNegativeTestCase.java @@ -0,0 +1,9 @@ +package org.etsi.mts.ttcn3.part9.popup.actions; + +public class NewNegativeTestCase extends NewTestCase { + + public NewNegativeTestCase() { + super(TCKind.Neg); + } + +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewPositiveTestCase.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewPositiveTestCase.java new file mode 100644 index 0000000000000000000000000000000000000000..935a442c2e8ec2401da19a66d3a93505b4817a0d --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewPositiveTestCase.java @@ -0,0 +1,8 @@ +package org.etsi.mts.ttcn3.part9.popup.actions; + +public class NewPositiveTestCase extends NewTestCase { + + public NewPositiveTestCase() { + super(TCKind.Pos); + } +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewTestCase.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewTestCase.java new file mode 100644 index 0000000000000000000000000000000000000000..8b25e81ef2d10b2017820ef9eaf317c02759570d --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/NewTestCase.java @@ -0,0 +1,199 @@ +package org.etsi.mts.ttcn3.part9.popup.actions; + +import java.io.ByteArrayInputStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.TreePath; +import org.eclipse.jface.viewers.TreeSelection; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IActionDelegate; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +public class NewTestCase implements IObjectActionDelegate { + + private Shell shell; + + protected TCKind tckind = TCKind.Pos; + + protected ISelection selection; + + private static final String TTCN_TEMPLATE = "/***************************************************\n" + + " ** @author STF 475\n" + + " ** @version 0.0.1\n" + + " ** @purpose 9:%1$s, TODO write purpose\n" + + " ** @verdict pass %4$s\n" + + " ***************************************************/\n" + + "module %2$s {\n" + + "\n" + + " import from schema_%2$s language \"XSD\" all;\n" + + " // TODO specify type for the template\n" + + " template __type__ m_msg := omit;\n" + + "\n" + + "//#TC%3$s\n" + +"}\n"; + + private static final String XSD_TEMPLATE = + "\n" + + "\n" + + " \n" + + ""; + + private static final String XML_TEMPLATE = + "\n" + + "\n" + + "\n"; + + /** + * Constructor for generic action. + */ + public NewTestCase(TCKind kind) { + super(); + this.tckind = kind; + } + + /** + * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) + */ + public void setActivePart(IAction action, IWorkbenchPart targetPart) { + shell = targetPart.getSite().getShell(); + } + + public void run(IAction action) { + createTestCase(); + } + + //this has to be called if this is executed as command because only as action the selection and + //the shell are updated automatically + public void runAsCommand() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window != null) { + shell = window.getShell(); + selection = window.getSelectionService().getSelection(); + } + createTestCase(); + } + + /** + * @see IActionDelegate#run(IAction) + */ + private void createTestCase() { + if (selection == null) { + MessageDialog.openError(shell, "New test case", "Unsupported explorer view or no selection"); + return; + } + + TreePath[] paths = ((TreeSelection) selection).getPaths(); + TreePath p = paths[0]; + IFolder folder = (IFolder) p.getLastSegment(); + String name = guessTCName(folder); + if (name == null) { + MessageDialog.openInformation( + shell, + "NewTestCase", + "New Action was executed, but the folder is full"); + return; + } + + createFiles(folder, name); + + } + + private boolean createFiles(IFolder folder, String name) { + IFolder tcfolder = folder.getFolder(name); + NullProgressMonitor pm = new NullProgressMonitor(); + String section = getSectionString(folder.getName()); + try{ + pm.beginTask("New test case", 4); + tcfolder.create(true, true, new NullProgressMonitor()); + pm.worked(1); + String tcMacroSuffix = TCKind.Neg.equals(tckind) ? "_Neg" : ""; + String tcVerdict = TCKind.Neg.equals(tckind) ? "reject" : "accept, ttcn3verdict:pass"; + + // TODO get section number + String ttcn_content = String.format(TTCN_TEMPLATE, section, name, tcMacroSuffix, tcVerdict); + String xsd_content = String.format(XSD_TEMPLATE, name); + String xml_content = String.format(XML_TEMPLATE, name); + + if (pm.isCanceled()) return false; + createFile(tcfolder, ".ttcn_", ttcn_content, pm); + + if (pm.isCanceled()) return false; + createFile(tcfolder, ".xsd", xsd_content, pm); + + if (pm.isCanceled()) return false; + createFile(tcfolder, ".xml", xml_content, pm); + } catch (CoreException e) { + MessageDialog.openError(shell, "New test case", "Failed to create a test case\n"+e.getLocalizedMessage()); + return false; + } finally { + pm.done(); + } + return true; + } + + private String getSectionString(String name) { + Pattern regex = Pattern.compile("^([0-9]+)_"); + String section = "0.0.0."; + Matcher matcher = regex.matcher(name); + if (matcher.find()) { + String rawSection = matcher.group(1); + StringBuilder result = new StringBuilder(); + int start = 0, end = rawSection.length(); + for (; start < end; start += 2) { + if (start > 0) result.append('.'); + char ch1 = rawSection.charAt(start); + if (ch1 != '0') { + result.append(ch1); + } + if (start + 1 < end) { + result.append(rawSection.charAt(start+1)); + } + } + section = result.toString(); + } + return section; + } + + private String guessTCName(IFolder folder) + { + String nameBase = folder.getName(); + String name = null; + + for (int i = 1; i < 999; i++) { + name = String.format("%s_%s_%03d", this.tckind.name(), nameBase, i); + if (null == folder.findMember(name)) return name; + } + return null; + } + + private IFile createFile(IFolder tcfolder, String extension, + String content, NullProgressMonitor pm) + throws CoreException { + IFile file = tcfolder.getFile(tcfolder.getName() + extension); + + file.create(new ByteArrayInputStream(content.getBytes()), true, pm); + pm.worked(1); + return file; + } + + /** + * @see IActionDelegate#selectionChanged(IAction, ISelection) + */ + public void selectionChanged(IAction action, ISelection selection) { + this.selection = selection; + } + +} diff --git a/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/TCKind.java b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/TCKind.java new file mode 100644 index 0000000000000000000000000000000000000000..31eb126dee8f585ed23f92591adc292f1ad54b43 --- /dev/null +++ b/tools/NewTestCasePlugin/plugin/src/org/etsi/mts/ttcn3/part9/popup/actions/TCKind.java @@ -0,0 +1,5 @@ +package org.etsi.mts.ttcn3.part9.popup.actions; + +public enum TCKind { + Neg, Pos +} diff --git a/tools/NewTestCasePlugin/updateSite/.project b/tools/NewTestCasePlugin/updateSite/.project new file mode 100644 index 0000000000000000000000000000000000000000..a75753a41f6380f7e30c04be474c2a5399d81aec --- /dev/null +++ b/tools/NewTestCasePlugin/updateSite/.project @@ -0,0 +1,11 @@ + + + NewTestCaseUpdateSite + + + + + + + + diff --git a/tools/NewTestCasePlugin/updateSite/site.xml b/tools/NewTestCasePlugin/updateSite/site.xml new file mode 100644 index 0000000000000000000000000000000000000000..8b2822ce81adb75be4d7ad4ade24beaf0c53b7c3 --- /dev/null +++ b/tools/NewTestCasePlugin/updateSite/site.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/STF475Tools/.classpath b/tools/STF475Tools/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..07ca123c631adcc68bdbdb3380f617db38fdaf33 --- /dev/null +++ b/tools/STF475Tools/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/tools/STF475Tools/.project b/tools/STF475Tools/.project new file mode 100644 index 0000000000000000000000000000000000000000..2f1366d987a9bc7a5b1471f99de28ecb9c0286c4 --- /dev/null +++ b/tools/STF475Tools/.project @@ -0,0 +1,17 @@ + + + STF475Tools + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/tools/STF475Tools/.settings/org.eclipse.core.resources.prefs b/tools/STF475Tools/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..ef2e0b38c939d8dc20b4481a783be64c631f2179 --- /dev/null +++ b/tools/STF475Tools/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//resources/ics-section-head.html=ISO-8859-1 diff --git a/tools/STF475Tools/.settings/org.eclipse.jdt.core.prefs b/tools/STF475Tools/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..c3426e6a47008a7e66fcd9a0fcb10d2252ec1416 --- /dev/null +++ b/tools/STF475Tools/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Mon Nov 22 15:29:08 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/tools/STF475Tools/README.txt b/tools/STF475Tools/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..99872bd61d14f8c98e77e62157fe6a3f20fae1db --- /dev/null +++ b/tools/STF475Tools/README.txt @@ -0,0 +1,12 @@ +HOWTO +===== + +Configure local paths in resources/STF475Tools.properties +Right-click on deliver.jardesc to create the jar file. +Usage: + + java -jar deliver.jar + +It generates in the DeliverableATSPath the ATS folder containing the TTCN-3 code as well as 3 HTML files that have to be copied to the documents delivered to ETSI. + +On errors please check the T3Doc from the reported TTCN-3 file. \ No newline at end of file diff --git a/tools/STF475Tools/deliver.jar b/tools/STF475Tools/deliver.jar new file mode 100644 index 0000000000000000000000000000000000000000..2588bc1b510354f5fa80063a0ea459b6931e4fc4 Binary files /dev/null and b/tools/STF475Tools/deliver.jar differ diff --git a/tools/STF475Tools/deliver.jardesc b/tools/STF475Tools/deliver.jardesc new file mode 100644 index 0000000000000000000000000000000000000000..2129b976f3081fdd1eae03db32f7b744472e9705 --- /dev/null +++ b/tools/STF475Tools/deliver.jardesc @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tools/STF475Tools/deliver.sh b/tools/STF475Tools/deliver.sh new file mode 100644 index 0000000000000000000000000000000000000000..1864383af3f221732b676ecb3616f07fe096eaa8 --- /dev/null +++ b/tools/STF475Tools/deliver.sh @@ -0,0 +1,2 @@ +#!/bin/sh +java -jar deliver.jar $1 $2 diff --git a/tools/STF475Tools/resources/ICSTable-sample.htm b/tools/STF475Tools/resources/ICSTable-sample.htm new file mode 100644 index 0000000000000000000000000000000000000000..d97f93d3759b1ed88df3821ce9c90d9d5bd6179e --- /dev/null +++ b/tools/STF475Tools/resources/ICSTable-sample.htm @@ -0,0 +1,875 @@ + + + + + + + + + + + + + + + + + + +
+ +

A.3.2 Basic language +elements

+ +

Table A.1: Basic language elements

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Item

+
+

Is the implementation able to...

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

1

+
+

support case sensitive identifiers?

+
+

Clause 5.1

+
+

m

+
+

 

+
+

2

+
+

support the nine basic scope units?

+
+

Clause 5.2

+
+

m

+
+

 

+
+

3

+
+

support the scope rules?

+
+

Clause 5.2

+
+

m

+
+

 

+
+

4

+
+

support uniqueness of identifiers?

+
+

Clause 5.2.2

+
+

m

+
+

 

+
+

5

+
+

support arbitrary order of language elements?

+
+

Clause 5.3

+
+

m

+
+

 

+
+

6

+
+

support formal parameters of kind value?

+
+

Clause 5.4.1.1

+
+

m

+
+

 

+
+

7

+
+

support formal parameters of kind template?

+
+

Clause 5.4.1.2

+
+

m

+
+

 

+
+ +
+ +

 

+ +
+ + + + diff --git a/tools/STF475Tools/resources/STF475Tools.properties b/tools/STF475Tools/resources/STF475Tools.properties new file mode 100644 index 0000000000000000000000000000000000000000..bbc9cbf2f3c43960dc3ddcb89cac8b8b9af35d76 --- /dev/null +++ b/tools/STF475Tools/resources/STF475Tools.properties @@ -0,0 +1,4 @@ +#TempPath=/Users/bst/Downloads/STF475/temp +LogPath=log +ATSPath=../ATS +DeliverableATSPath=../Docs/deliverable \ No newline at end of file diff --git a/tools/STF475Tools/resources/ics-file-foot.html b/tools/STF475Tools/resources/ics-file-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..bb4f56546c1ab5f225c9153f48bc8c8a86c52c53 --- /dev/null +++ b/tools/STF475Tools/resources/ics-file-foot.html @@ -0,0 +1,4 @@ + + + + diff --git a/tools/STF475Tools/resources/ics-file-head.html b/tools/STF475Tools/resources/ics-file-head.html new file mode 100644 index 0000000000000000000000000000000000000000..168e6b7f7ee6b35759e2f679e89c19949b4c0c59 --- /dev/null +++ b/tools/STF475Tools/resources/ics-file-head.html @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + +
+ diff --git a/tools/STF475Tools/resources/ics-section-foot.html b/tools/STF475Tools/resources/ics-section-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..3b1b2b7300e2eb9ee7517065f9b7a8a672708aa6 --- /dev/null +++ b/tools/STF475Tools/resources/ics-section-foot.html @@ -0,0 +1,7 @@ + + +
+ +

 

+ + diff --git a/tools/STF475Tools/resources/ics-section-head.html b/tools/STF475Tools/resources/ics-section-head.html new file mode 100644 index 0000000000000000000000000000000000000000..ac172ed47fbf816b55e01f3d1f43f62f52fb809c --- /dev/null +++ b/tools/STF475Tools/resources/ics-section-head.html @@ -0,0 +1,45 @@ +

{{TARGETCLAUSE}} {{CLAUSEDESCRIPTION}}

+ +

Table {{TABLENUMBER}}: {{CLAUSEDESCRIPTION}}

+ +
+ + + + + + + + + + diff --git a/tools/STF475Tools/resources/ics-table-line.html b/tools/STF475Tools/resources/ics-table-line.html new file mode 100644 index 0000000000000000000000000000000000000000..d1f771b4a25d1d59087c8885754e3030e4a0acba --- /dev/null +++ b/tools/STF475Tools/resources/ics-table-line.html @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/tools/STF475Tools/resources/references.properties b/tools/STF475Tools/resources/references.properties new file mode 100644 index 0000000000000000000000000000000000000000..e7ef23d52d89def3eed6b31ad38b7feb3e6242ea --- /dev/null +++ b/tools/STF475Tools/resources/references.properties @@ -0,0 +1,141 @@ +5=Mapping XML Schemas +5.1=Namespaces and document references +5.1.1=Namespaces +5.1.2=Includes +5.1.3=Imports +5.1.4=Attributes of the XSD schema element +5.1.5=The control namespace +5.2=Name conversion +5.2.1=General +5.2.2=Name conversion rules +5.2.3=Order of the mapping +5.3=Mapping of XSD schema components +5.4=Unsupported features +6=Built-in data types +6.1=Mapping of facets +6.1.1=Length +6.1.2=MinLength +6.1.3=MaxLength +6.1.4=Pattern +6.1.5=Enumeration +6.1.6=WhiteSpace +6.1.7=MinInclusive +6.1.8=MaxInclusive +6.1.9=MinExclusive +6.1.10=MaxExclusive +6.1.11=Total digits +6.1.12=Fraction digits +6.1.13=Not specifically mapped facets +6.2=String types +6.2.1=String +6.2.2=Normalized string +6.2.3=Token +6.2.4=Name +6.2.5=NMTOKEN +6.2.6=NCName +6.2.7=ID +6.2.8=IDREF +6.2.9=ENTITY +6.2.10=Hexadecimal binary +6.2.11=Base 64 binary +6.2.12=Any URI +6.2.13=Language +6.2.14=NOTATION +6.3=Integer types +6.3.1=Integer +6.3.2=Positive integer +6.3.3=Non-positive integer +6.3.4=Negative integer +6.3.5=Non-negative integer +6.3.6=Long +6.3.7=Unsigned long +6.3.8=Int +6.3.9=Unsigned int +6.3.10=Short +6.3.11=Unsigned Short +6.3.12=Byte +6.3.13=Unsigned byte +6.4=Float types +6.4.1=Decimal +6.4.2=Float +6.4.3=Double +6.5=Time types +6.5.1=Duration +6.5.2=Date and time +6.5.3=Time +6.5.4=Date +6.5.5=Gregorian year and month +6.5.6=Gregorian year +6.5.7=Gregorian month and day +6.5.8=Gregorian day +6.5.9=Gregorian month +6.6=Sequence types +6.6.1=NMTOKENS +6.6.2=IDREFS +6.6.3=ENTITIES +6.6.4=QName +6.7=Boolean type +6.8=AnyType and anySimpleType types +7=Mapping XSD components +7.1=Attributes of XSD component declarations +7.1.1=Id +7.1.2=Ref +7.1.3=Name +7.1.4=MinOccurs and maxOccurs +7.1.5=Default and Fixed +7.1.6=Form +7.1.7=Type +7.1.8=Mixed +7.1.9=Abstract +7.1.10=Block and blockDefault +7.1.11=Nillable +7.1.12=Use +7.1.13=Substitution group +7.1.14=Final +7.1.15=Process contents +7.2=Schema component +7.3=Element component +7.4=Attribute and attribute group definitions +7.4.1=Attribute element definitions +7.4.2=Attribute group definitions +7.5=SimpleType components +7.5.1=Derivation by restriction +7.5.2=Derivation by list +7.5.3=Derivation by union +7.6=ComplexType components +7.6.1=ComplexType containing simple content +7.6.1.1=Extending simple content +7.6.1.2=Restricting simple content +7.6.2=ComplexType containing complex content +7.6.2.1=Complex content derived by extension +7.6.2.2=Complex content derived by restriction +7.6.3=Referencing group components +7.6.4=All content +7.6.5=Choice content +7.6.5.1=Choice with nested elements +7.6.5.2=Choice with nested group +7.6.5.3=Choice with nested choice +7.6.5.4=Choice with nested sequence +7.6.5.5=Choice with nested any +7.6.6=Sequence content +7.6.6.1=Sequence with nested element content +7.6.6.2=Sequence with nested group content +7.6.6.3=Sequence with nested choice content +7.6.6.4=Sequence with nested sequence content +7.6.6.5=Sequence with nested any content +7.6.6.6=Effect of the minOccurs and maxOccurs attributes on the mapping +7.6.7=Attribute definitions, attribute and attributeGroup references +7.6.8=Mixed content +7.7=Any and anyAttribute +7.7.1=The any element +7.7.2=The anyAttribute element +7.8=Annotation +7.9=Group components +7.10=Identity-constraint definition schema components +8=Substitutions +8.1=Element substitution +8.1.1=Head elements of substitution groups +8.1.2=Substitution group members +8.2=Type substitution +A=Annex A (normative): TTCN-3 module XSD +B=Annex B (normative): Encoding instructions \ No newline at end of file diff --git a/tools/STF475Tools/resources/tp-file-foot.html b/tools/STF475Tools/resources/tp-file-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..6084cbf673b09a221b4c10500c27994cb86755ae --- /dev/null +++ b/tools/STF475Tools/resources/tp-file-foot.html @@ -0,0 +1,8 @@ + +

 

+ + + + + + \ No newline at end of file diff --git a/tools/STF475Tools/resources/tp-file-head.html b/tools/STF475Tools/resources/tp-file-head.html new file mode 100644 index 0000000000000000000000000000000000000000..7b35c968f1fb7d260b83f81de6336869d1afc3ed --- /dev/null +++ b/tools/STF475Tools/resources/tp-file-head.html @@ -0,0 +1,534 @@ + + + + + + + + + + + + + + + + + + +
+ diff --git a/tools/STF475Tools/resources/tp-sample.htm b/tools/STF475Tools/resources/tp-sample.htm new file mode 100644 index 0000000000000000000000000000000000000000..caafe2ca85db2d147fa895e7cbfba36f333e1d38 --- /dev/null +++ b/tools/STF475Tools/resources/tp-sample.htm @@ -0,0 +1,734 @@ + + + + + + + + + + + + + + + + + + +
+

Item

+
+

TC/TP reference

+
+

purpose

+
+

Reference in ES 201 873-1

+
+

Status

+
+

Support

+
+

{{NUMBER}}

+
+

{{TCTPREF}}

+
+

{{PURPOSE}}

+
+

{{CLAUSE}}

+
+

{{STATUS}}

+
+

 

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

TP_NegSyn_0501_Identifier

+
+

Reference

+
+

ES + 201 873-1 [1], + Clause 5.1

+
+

ICS

+
+

None

+
+

Dependencies

+
+

None

+
+

Summary

+
+

Ensure + that when the IUT loads a module containing an identifier named with a + keyword then the module is rejected

+
+

Expected Output

+
+

Rejection + as invalid

+
+

Notes

+
+

 

+
+ +
+ +

 

+ + + + + + diff --git a/tools/STF475Tools/resources/tp-section-foot.html b/tools/STF475Tools/resources/tp-section-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..c42daf6464196f24b2a8d7a636fb92629b77ac5b --- /dev/null +++ b/tools/STF475Tools/resources/tp-section-foot.html @@ -0,0 +1,2 @@ + + diff --git a/tools/STF475Tools/resources/tp-section-head.html b/tools/STF475Tools/resources/tp-section-head.html new file mode 100644 index 0000000000000000000000000000000000000000..f5518f6d7c20f4866fbbdb95178fd16ec0c49f62 --- /dev/null +++ b/tools/STF475Tools/resources/tp-section-head.html @@ -0,0 +1,9 @@ +

{{CHAPTERNUMBER}} {{CHAPTERTITLE}}

+ +
diff --git a/tools/STF475Tools/resources/tp-table.html b/tools/STF475Tools/resources/tp-table.html new file mode 100644 index 0000000000000000000000000000000000000000..f4292ddc06fdbc80f5f252640fba41f2d4201a0a --- /dev/null +++ b/tools/STF475Tools/resources/tp-table.html @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Test Purpose Id

+
+

{{TESTPURPOSEID}}

+
+

Reference

+
+

{{REFERENCE}}

+
+

ICS

+
+

{{ICS}}

+
+

Dependencies

+
+

{{DEPENDENCIES}}

+
+

Summary

+
+

{{SUMMARY}}

+
+

Expected Output

+
+

{{EXPECTEDOUTPUT}}

+
+

Notes

+
+

{{NOTES}}

+
+
\ No newline at end of file diff --git a/tools/STF475Tools/resources/tss-file-foot.html b/tools/STF475Tools/resources/tss-file-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..6ee71e3d7c8395209cf9d03c6e0d1a6ac50afe8f --- /dev/null +++ b/tools/STF475Tools/resources/tss-file-foot.html @@ -0,0 +1,9 @@ +

 

+ +

 

+ +
+ + + + \ No newline at end of file diff --git a/tools/STF475Tools/resources/tss-file-head.html b/tools/STF475Tools/resources/tss-file-head.html new file mode 100644 index 0000000000000000000000000000000000000000..38d4a9393bb63a83ca39e309e00a739c8a0457a1 --- /dev/null +++ b/tools/STF475Tools/resources/tss-file-head.html @@ -0,0 +1,464 @@ + + + + + + + + + + + + + + + + + + +
+ diff --git a/tools/STF475Tools/resources/tss-sample.htm b/tools/STF475Tools/resources/tss-sample.htm new file mode 100644 index 0000000000000000000000000000000000000000..ee748c460d2292e968ce60cb759b2c92b12db9f1 --- /dev/null +++ b/tools/STF475Tools/resources/tss-sample.htm @@ -0,0 +1,673 @@ + + + + + + + + + + + + + + + + + + +
+ +

Table B.1: Test +suite structure, positive tests

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Basic language + elements

+
+

Identifiers and keywords

+
+

TC_Syn_0501_Identifier_xxx

+
+

TC_Sem_0501_Identifier_xxx

+
+

Scope rules

+
+

TC_Syn_0502_Scopes_xxx

+
+

TC_Sem_0502_Scopes_xxx

+
+

Ordering of + language elements

+
+

TC_Syn_0503_Ordering_xxx

+
+

TC_Sem_0503_Ordering_xxx

+
+

Types and values

+
+

Basic types and + values

+
+

TC_Syn _0601_BasicTypes_xxx

+
+

TC_Sem _0601_BasicTypes_xxx

+
+

Structured types + and values

+
+

TC_Syn _0602_StructuredTypes_xxx

+
+

TC_Sem _0602_StructuredTypes_xxx

+
+

Type + compatibility

+
+

TC_Syn _0603_TypeComp_xxx

+
+

TC_Sem _0603_TypeComp_xxx

+
+

Type synonym

+
+

TC_Syn _0604_TypeSynonym_xxx

+
+

TC_Sem _0700_Expressions_xxx

+
+ +
+ +

 

+ +

 

+ +
+ + + + diff --git a/tools/STF475Tools/resources/tss-section-foot.html b/tools/STF475Tools/resources/tss-section-foot.html new file mode 100644 index 0000000000000000000000000000000000000000..1c58c9acb390251bc47aacb256a594ef8770f543 --- /dev/null +++ b/tools/STF475Tools/resources/tss-section-foot.html @@ -0,0 +1,4 @@ + + + +
\ No newline at end of file diff --git a/tools/STF475Tools/resources/tss-section-head.html b/tools/STF475Tools/resources/tss-section-head.html new file mode 100644 index 0000000000000000000000000000000000000000..3323517f2af05aad09a2ca49b2a4ce1a5547f6bd --- /dev/null +++ b/tools/STF475Tools/resources/tss-section-head.html @@ -0,0 +1,8 @@ + +

Table {{TABLENUMBER}}: {{TABLEDESCRIPTION}}

+ +
+ + \ No newline at end of file diff --git a/tools/STF475Tools/src/Clause.java b/tools/STF475Tools/src/Clause.java new file mode 100644 index 0000000000000000000000000000000000000000..c0911ea48cac5a0d106c30e1c121fac2fb60952f --- /dev/null +++ b/tools/STF475Tools/src/Clause.java @@ -0,0 +1,276 @@ +public class Clause implements Comparable { + private Integer mainClause = null; + private Integer subClause = null; + private Integer subSubClause = null; + private Integer subSubSubClause = null; + private Integer subSubSubSubClause = null; + private Integer subSubSubSubSubClause = null; + private Character annex = null; + + public Integer getMainClause() { + return mainClause; + } + + public void setMainClause(Integer mainClause) { + this.mainClause = mainClause; + } + + public Integer getSubClause() { + return subClause; + } + + public void setSubClause(Integer subClause) { + this.subClause = subClause; + } + + public Integer getSubSubClause() { + return subSubClause; + } + + public void setSubSubClause(Integer subSubClause) { + this.subSubClause = subSubClause; + } + + public Integer getSubSubSubClause() { + return subSubSubClause; + } + + public void setSubSubSubClause(Integer subSubSubClause) { + this.subSubSubClause = subSubSubClause; + } + + public Integer getSubSubSubSubClause() { + return subSubSubSubClause; + } + + public void setSubSubSubSubClause(Integer subSubSubSubClause) { + this.subSubSubSubClause = subSubSubSubClause; + } + + public Integer getSubSubSubSubSubClause() { + return subSubSubSubSubClause; + } + + public void setSubSubSubSubSubClause(Integer subSubSubSubSubClause) { + this.subSubSubSubSubClause = subSubSubSubSubClause; + } + + public Character getAnnex() { + return annex; + } + + public void setAnnex(Character annex) { + this.annex = annex; + } + + public Clause(String clause) { + String clauseString = clause; + if (Character.isLetter(clauseString.charAt(0))) { // we start with an + // annex + annex = new Character(clauseString.charAt(0)); + + if (clause.length() == 1) + return; + + clauseString = clause.substring(1); + } + if (clauseString.charAt(0) == '.') { + clauseString = clauseString.substring(1); + } + + if (clauseString.contains(".")) { + + String[] parts = clauseString.split("\\."); + if (parts.length >= 1) + mainClause = Integer.parseInt(parts[0]); + if (parts.length >= 2) + subClause = Integer.parseInt(parts[1]); + if (parts.length >= 3) + subSubClause = Integer.parseInt(parts[2]); + if (parts.length >= 4) + subSubSubClause = Integer.parseInt(parts[3]); + if (parts.length >= 5) + subSubSubSubClause = Integer.parseInt(parts[4]); + if (parts.length >= 6) + subSubSubSubSubClause = Integer.parseInt(parts[5]); + } else { + mainClause = Integer.parseInt(clauseString); + } + + } + + public String toString() { + StringBuffer result = new StringBuffer(); + + if (annex != null) { + result.append(annex); + } + + if (mainClause != null) { + if (annex != null) + result.append("."); + result.append(mainClause); + } + + if (subClause != null) { + result.append("."); + result.append(subClause); + + if (subSubClause != null) { + result.append("."); + result.append(subSubClause); + + if (subSubSubClause != null) { + result.append("."); + result.append(subSubSubClause); + + if (subSubSubSubClause != null) { + result.append("."); + result.append(subSubSubSubClause); + + if (subSubSubSubSubClause != null) { + result.append("."); + result.append(subSubSubSubSubClause); + } + } + } + } + } + + return result.toString(); + } + + @Override + public int compareTo(Clause y) { + if ((annex != null) && (y.getAnnex() == null)) { + return +1; + } + if ((annex == null) && (y.getAnnex() != null)) { + return -1; + } + + if ((annex != null) && (y.getAnnex() != null) + && (!annex.equals(y.getAnnex()))) { + if (annex > y.getAnnex()) { + return +1; + } else { + return -1; + } + } + + if (((annex == null) && (y.getAnnex() == null)) + || (annex.equals(y.getAnnex()))) { + if (annex != null && y.getAnnex() != null + && annex.equals(y.getAnnex()) && mainClause == null + && y.getMainClause() != null) + return -1; + + if (annex != null && y.getAnnex() != null + && annex.equals(y.getAnnex()) && mainClause != null + && y.getMainClause() == null) + return +1; + + if (mainClause > y.getMainClause()) { + return +1; + } + if (mainClause < y.getMainClause()) { + return -1; + } + + if ((mainClause != null) && (y.getMainClause() != null)) { + if (mainClause.equals(y.getMainClause())) { + if ((subClause == null) && (y.getSubClause() != null)) + return -1; + if ((subClause != null) && (y.getSubClause() == null)) + return +1; + + if (subClause > y.getSubClause()) { + return +1; + } + if (subClause < y.getSubClause()) { + return -1; + } + + if (subClause.equals(y.getSubClause())) { + if ((subSubClause == null) + && (y.getSubSubClause() != null)) + return -1; + if ((subSubClause != null) + && (y.getSubSubClause() == null)) + return +1; + + if (subSubClause > y.getSubSubClause()) { + return +1; + } + if (subSubClause < y.getSubSubClause()) { + return -1; + } + + if (subSubClause.equals(y.getSubSubClause())) { + if ((subSubSubClause == null) + && (y.getSubSubSubClause() != null)) + return -1; + if ((subSubSubClause != null) + && (y.getSubSubSubClause() == null)) + return +1; + + if (subSubSubClause > y.getSubSubSubClause()) { + return +1; + } + if (subSubSubClause < y.getSubSubSubClause()) { + return -1; + } + + if (subSubSubClause.equals(y.getSubSubSubClause())) { + if ((subSubSubSubClause == null) + && (y.getSubSubSubSubClause() != null)) + return -1; + if ((subSubSubSubClause != null) + && (y.getSubSubSubSubClause() == null)) + return +1; + + if (subSubSubSubClause > y + .getSubSubSubSubClause()) { + return +1; + } + if (subSubSubSubClause < y + .getSubSubSubSubClause()) { + return -1; + } + + if (subSubSubSubClause.equals(y + .getSubSubSubSubClause())) { + if ((subSubSubSubSubClause == null) + && (y.getSubSubSubSubSubClause() != null)) + return -1; + if ((subSubSubSubSubClause != null) + && (y.getSubSubSubSubSubClause() == null)) + return +1; + + if (subSubSubSubSubClause > y + .getSubSubSubSubSubClause()) { + return +1; + } + if (subSubSubSubSubClause < y + .getSubSubSubSubSubClause()) { + return -1; + } + + return 0; + } + + } + + } + + } + } + } + + return 0; + } + + return 0; + } + +} diff --git a/tools/STF475Tools/src/ClauseEntry.java b/tools/STF475Tools/src/ClauseEntry.java new file mode 100644 index 0000000000000000000000000000000000000000..8776aaf9c5008ac3b9963d40b126bada8f9b6b52 --- /dev/null +++ b/tools/STF475Tools/src/ClauseEntry.java @@ -0,0 +1,32 @@ +import java.io.File; + +public class ClauseEntry { + private File file; + private T3Purpose purpose; + private T3ExpectedOutput expected; + + public File getFile() { + return file; + } + + public void setFile(File file) { + this.file = file; + } + + public T3Purpose getPurpose() { + return purpose; + } + + public void setPurpose(T3Purpose purpose) { + this.purpose = purpose; + } + + public T3ExpectedOutput getExpected() { + return expected; + } + + public void setExpected(T3ExpectedOutput expected) { + this.expected = expected; + } + +} diff --git a/tools/STF475Tools/src/Clipboard2JavaString.java b/tools/STF475Tools/src/Clipboard2JavaString.java new file mode 100644 index 0000000000000000000000000000000000000000..242a5e0d737336de767487dadcdda5f9d0bfef20 --- /dev/null +++ b/tools/STF475Tools/src/Clipboard2JavaString.java @@ -0,0 +1,33 @@ +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import javax.swing.JFrame; + +public class Clipboard2JavaString extends JFrame { + private static final long serialVersionUID = 1L; + Clipboard clipboard = null; + + public void run() { + if (clipboard == null) + clipboard = getToolkit().getSystemClipboard(); + Transferable clipData = clipboard.getContents(this); + String s; + try { + s = (String) (clipData.getTransferData(DataFlavor.stringFlavor)); + String[] strings = s.split("[\r\n]+"); + for (int i = 0; i < strings.length; i++) { + if (i < strings.length - 1) + System.out.println("\"" + strings[i] + "\\n\" + "); + else + System.out.println("\"" + strings[i] + "\";"); + } + } catch (Exception ee) { + ee.printStackTrace(); + } + + } + + public static void main(String[] args) { + new Clipboard2JavaString().run(); + } +} diff --git a/tools/STF475Tools/src/CoverageLister.java b/tools/STF475Tools/src/CoverageLister.java new file mode 100644 index 0000000000000000000000000000000000000000..85372bb7ef411026a12df90af15abb667249dcdb --- /dev/null +++ b/tools/STF475Tools/src/CoverageLister.java @@ -0,0 +1,121 @@ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.Properties; + + +public class CoverageLister { + + public static Properties config = new Properties(); + public static Properties references = new Properties(); + public static ArrayList foo = new ArrayList(); + public static HashSet atsDirectories = new HashSet(); + public static ArrayList atsFiles = new ArrayList(); + public static HashSet coveredClauses = new HashSet(); + + + public String clauseEnhancer(String str) { + String[] parts = str.split("\\."); + + String composed = ""; + + for (int i=0; i < parts.length; i++) { + try { + int number = Integer.parseInt(parts[i]); + composed += String.format("%02d", number); + } catch (NumberFormatException e) { + composed += parts[i]; + } + if (i+1 < parts.length) + composed += "."; + } + return composed; + } + + public void run() { + try { + FileUtils.loadConfig(config); + FileUtils.loadReferences(references); + } catch (IOException e) { + System.err.println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + String atsPath = config.get("ATSPath").toString(); + System.out.println("Scanning files in "+atsPath+"..."); + FileUtils.visitAllFiles(new File(atsPath), atsFiles); + + for (int i=0; i < atsFiles.size(); i++) { + atsDirectories.add(atsFiles.get(i).getParentFile().getName()); + } + + Iterator it = atsDirectories.iterator(); + + while (it.hasNext()) { + String entry = it.next(); + String[] parts = entry.split("_"); + String clause = clausePreparer(parts[1]); + coveredClauses.add(clause); +// System.out.println(clause); + } + + Iterator> it2 = references.entrySet().iterator(); + + while (it2.hasNext()) { + Entry entry = it2.next(); + + String str = ""; + str += clauseEnhancer(entry.getKey().toString()); + str += "\t"; + str += entry.getValue(); + str += "\t"; + if (coveredClauses.contains(clauseEnhancer(entry.getKey().toString()))) + str += "**covered**"; + + foo.add(str); + } + + Collections.sort(foo); + + System.out.println("Sections not covered by tests, please note that only one section was referenced by a test. There are tests that cover multiple standard sections."); + for (int i=0; i < foo.size(); i++) { + if (!foo.get(i).contains("**covered**")) +// System.out.println(foo.get(i)); + System.out.println(foo.get(i).replaceAll("\\*\\*covered\\*\\*", "")); + } + + } + + public String clausePreparer(String str) { + int index = 0; + String targetStr = ""; + + while (index < str.length()) { + char prefixChar = str.charAt(index); + if (prefixChar >= 'A' && prefixChar <= 'E') { + targetStr += str.substring(index,index+1); + index++; + if (index < str.length()) + targetStr += "."; + } else { + targetStr += str.substring(index,index+2); + index += 2; + if (index < str.length()) + targetStr += "."; + } + } + + return targetStr; + } + + public CoverageLister() { + } + + public static void main(String[] args) { + new CoverageLister().run(); + } + +} diff --git a/tools/STF475Tools/src/DeliverableGenerator.java b/tools/STF475Tools/src/DeliverableGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..1bf76f969f6143ac5122303b8ab1c4d5c244ab35 --- /dev/null +++ b/tools/STF475Tools/src/DeliverableGenerator.java @@ -0,0 +1,107 @@ +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Properties; +import java.util.Set; + +public class DeliverableGenerator { + + private static final String[] IGNORED_FILES = {".svn", ".git", ".externalToolBuilders", ".settings", "bin", "ttcn3build"}; + private static Set ignoredFiles = new HashSet(Arrays.asList(IGNORED_FILES)); + + public static Properties config = new Properties(); + public static Properties references = new Properties(); + + public static void generateDeliverableDirectory(File sf, File tf) { + if (sf.isDirectory()) { + File newDir = new File(tf.getAbsolutePath() + "/" + sf.getName()); + if (ignoredFiles.contains(sf.getName())) + return; + + newDir.mkdir(); + String[] children = sf.list(); + for (int i = 0; i < children.length; i++) { + generateDeliverableDirectory(new File(sf, children[i]), newDir); + } + } else { + try { + if (sf.toString().toLowerCase().endsWith(".ttcn")) { + int moduleCount = FileUtils.countT3Modules(sf); + if (moduleCount <= 1) { + File targetFile = new File(tf + "/" + sf.getName()); + FileUtils.copyFile(sf, targetFile); + } else { + File targetFile = new File(tf + "/temp.ttcn"); + FileUtils.copyFile(sf, targetFile); + FileUtils.splitT3ModuleFiles(targetFile); + targetFile.delete(); + } + + // FileUtils.countT3Modules(f) + // copyFile(); + // System.out.println(sf.toString()); + } else if (sf.toString().toLowerCase().matches(".+\\.(xsd|xml)$")) { + File targetFile = new File(tf + "/" + sf.getName()); + FileUtils.copyFile(sf, targetFile); + } + + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + // ----------------------------------------------------------------------------------------------- + + public void run() { + System.out.println("STF475 Tools: ATS Deliverable Generator v0.5"); + try { + FileUtils.loadConfig(config); + FileUtils.loadReferences(references); + } catch (IOException e) { + System.err + .println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + String atsPath = config.get("ATSPath").toString(); + String deliverablePath = config.get("DeliverableATSPath").toString(); + + File deliverable = new File(deliverablePath); + deliverable.mkdirs(); + + generateDeliverableDirectory(new File(atsPath), deliverable); + +// List myList = new ArrayList(); +// Iterator it = references.keySet().iterator(); +// System.out.println("----"); +// while (it.hasNext()) { +// Object value = it.next(); +// if (value instanceof String) { +// myList.add(new Clause((String) value)); +// } +// } +// +// Collections.sort(myList); + +// String atsPath = config.get("ATSPath").toString(); +// System.out.println("Gathering files..."); +// FileUtils.visitAllFiles(new File(atsPath), files); +// +// System.out.println("Processing files..."); +// +// for (int i=0; i < files.size(); i++) { +// File tempFile = new File(config.get("TempPath") + "/" + files.get(i).getName()); +// } + + System.out.println("done."); + } + + // ----------------------------------------------------------------------------------------------- + + public static void main(String[] args) { + new DeliverableGenerator().run(); + } + +} diff --git a/tools/STF475Tools/src/FileUtils.java b/tools/STF475Tools/src/FileUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..c32885554ab956a4c4c8ec62ae06a322537a26e0 --- /dev/null +++ b/tools/STF475Tools/src/FileUtils.java @@ -0,0 +1,252 @@ +import java.io.BufferedReader; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class FileUtils { + + public static void visitAllFiles(File f, ArrayList files) { + if (f.isDirectory()) { + String[] children = f.list(); + for (int i = 0; i < children.length; i++) { + visitAllFiles(new File(f, children[i]), files); + } + } else { + if (f.toString().endsWith(".ttcn") || f.toString().endsWith(".ttcn_")) { + files.add(f); + } + } + } + + // ----------------------------------------------------------------------------------------------- + + public static void loadConfig(Properties config) throws IOException { + FileInputStream fis = new FileInputStream( + "resources/STF475Tools.properties"); + config.load(fis); + fis.close(); + if (/* (config.get("TempPath") == null) || */ + (config.get("LogPath") == null) + || (config.get("ATSPath") == null)) { + throw new IOException(); + } + + } + + // ----------------------------------------------------------------------------------------------- + + public static void loadReferences(Properties references) throws IOException { + FileInputStream fis = new FileInputStream( + "resources/references.properties"); + references.load(fis); + fis.close(); + } + + // ----------------------------------------------------------------------------------------------- + + @SuppressWarnings("resource") + public static void copyFile(File in, File out) throws IOException { + FileChannel inChannel = new FileInputStream(in).getChannel(); + FileChannel outChannel = new FileOutputStream(out).getChannel(); + try { + inChannel.transferTo(0, inChannel.size(), outChannel); + } catch (IOException e) { + throw e; + } finally { + if (inChannel != null) + inChannel.close(); + if (outChannel != null) + outChannel.close(); + } + } + + // ----------------------------------------------------------------------------------------------- + + public static int countT3Modules(File f) { + int moduleCount = 0; + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*module\\s+\\w+\\s*.*")) { + moduleCount++; + } + } + in.close(); + fs.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return moduleCount; + } + + // ----------------------------------------------------------------------------------------------- + + public static T3ExpectedOutput extractExpectedOutput(File f) { + T3ExpectedOutput t3ExpectedOutput = new T3ExpectedOutput(); + + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*\\*+\\s*@verdict\\s*.*")) { + Matcher matcher = Pattern.compile( + "^^\\s*\\*+\\s*@verdict\\s*pass\\s*(.*)") + .matcher(strLine); + if (matcher.find()) { + String result = matcher.group(1); + String[] split = result.split(","); + t3ExpectedOutput.setExpectedOutput(split[0].trim()); + if (split.length > 1) + t3ExpectedOutput + .setExecutionResult(split[1].trim()); + } + + // System.out.println(strLine); + } + } + in.close(); + fs.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + return t3ExpectedOutput; + } + + // ----------------------------------------------------------------------------------------------- + + public static T3Purpose extractPurpose(File f) { + T3Purpose t3Purpose = new T3Purpose(); + + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*\\*+\\s*@purpose\\s*.*")) { + Matcher matcher = Pattern + .compile( + "^\\s*\\*+\\s*@purpose\\s*(\\d+):(.*?)\\s*,\\s*(.*)") + .matcher(strLine); + if (matcher.find()) { + String result = matcher.group(1); + t3Purpose.setPartReference(Integer.parseInt(result)); + result = matcher.group(2); + t3Purpose.setClause(result); + result = matcher.group(3); + t3Purpose.setPurposeText(result); +// System.out.println(result); + + // t3ExpectedOutput.setExpectedOutput(split[0].trim()); + // if (split.length > 1) + // t3ExpectedOutput.setExecutionResult(split[1].trim()); + } + + // System.out.println(strLine); + } + } + in.close(); + fs.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + return t3Purpose; + } + + // ----------------------------------------------------------------------------------------------- + + public static ArrayList splitT3ModuleFiles(File f) { + ArrayList files = new ArrayList(); + StringBuffer current = new StringBuffer(); + File newFile = new File(f.getParent() + "//temp.ttcn"); + if (f.exists()) { + f.renameTo(newFile); + } + + try { + FileInputStream fs = new FileInputStream(newFile.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + int moduleCounter = 0; + String currentModuleName = ""; + + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*module\\s+\\w+\\s*.*")) { + moduleCounter++; + if (moduleCounter > 1) { // write file + String targetFilename = f.getParent() + "//" + + currentModuleName + ".ttcn"; + FileWriter fw = new FileWriter(targetFilename); + fw.write(current.toString()); + fw.close(); + current = new StringBuffer(); + files.add(new File(targetFilename)); + } + Matcher matcher = Pattern.compile( + "^\\s*module\\s+(\\w+)\\s*.*").matcher(strLine); + if (matcher.find()) { + currentModuleName = matcher.group(1); + } + } + current.append(strLine + "\n"); + } + // write file + String targetFilename = f.getParent() + "//" + currentModuleName + + ".ttcn"; + FileWriter fw = new FileWriter(targetFilename); + fw.write(current.toString()); + fw.close(); + in.close(); + fs.close(); + files.add(new File(targetFilename)); + newFile.delete(); + } catch (IOException e) { + e.printStackTrace(); + } + + return files; + } + + public static String loadFileToString(File file) throws IOException { + int len; + char[] chr = new char[4096]; + final StringBuffer buffer = new StringBuffer(); + BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "ISO-8859-1")); + try { + while ((len = reader.read(chr)) > 0) { + buffer.append(chr, 0, len); + } + } finally { + reader.close(); + } + return buffer.toString(); + } + + public static void saveStringToFile(File file, String str) throws IOException { + PrintWriter out = new PrintWriter(new FileWriter(file)); + out.print(str); + out.close(); + } +} diff --git a/tools/STF475Tools/src/ICSProformaTableGenerator.java b/tools/STF475Tools/src/ICSProformaTableGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..42422fe5fa29ebfb3d68265b3fa2aeaf170bb1b9 --- /dev/null +++ b/tools/STF475Tools/src/ICSProformaTableGenerator.java @@ -0,0 +1,160 @@ +// ICS is not generated anymore. we keep this only as a reference for possible further tools. + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +public class ICSProformaTableGenerator { + + public static Properties config = new Properties(); + public static Properties references = new Properties(); + private ArrayList files = new ArrayList(); + private HashMap> clauseMap = new HashMap>(); + + // ----------------------------------------------------------------------------------------------- + + public ICSProformaTableGenerator() { + } + + // ----------------------------------------------------------------------------------------------- + + public void run() { + System.out.println("STF475 Tools: ICS Proforma Table Generator v0.1"); + try { + FileUtils.loadConfig(config); + FileUtils.loadReferences(references); + } catch (IOException e) { + System.err + .println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + List myList = new ArrayList(); + Iterator it = references.keySet().iterator(); + System.out.println("----"); + while (it.hasNext()) { + Object value = it.next(); + if (value instanceof String) { + myList.add(new Clause((String) value)); + } + } + + Collections.sort(myList); + + String atsPath = config.get("ATSPath").toString(); + System.out.println("Gathering files..."); + FileUtils.visitAllFiles(new File(atsPath), files); + + System.out.println("Processing files..."); + for (int i=0; i < files.size(); i++) { + File origFile = files.get(i); +// File tempFile = new File(config.get("TempPath") + "/" + origFile.getName()); + File tempFile = origFile; // use original file instead of a copy + T3Purpose purpose = FileUtils.extractPurpose(tempFile); + T3ExpectedOutput expected = FileUtils.extractExpectedOutput(tempFile); +// System.out.println(purpose.getClauseStructured()); + ArrayList clauseEntries = clauseMap.get(purpose.getClauseStructured().toString()); + if (clauseEntries == null) + clauseEntries = new ArrayList(); + + ClauseEntry clauseEntry = new ClauseEntry(); + clauseEntry.setFile(tempFile); + clauseEntry.setPurpose(purpose); + clauseEntry.setExpected(expected); + clauseEntries.add(clauseEntry); + clauseMap.put(purpose.getClauseStructured().toString(), clauseEntries); + +// System.out.println(purpose); +// System.out.println(" " +references.get(purpose.getClause())); + } + + + try { + String icsFileHead = FileUtils.loadFileToString(new File("resources/ics-file-head.html")); + String icsFileFooter = FileUtils.loadFileToString(new File("resources/ics-file-foot.html")); + String icsSectionHead = FileUtils.loadFileToString(new File("resources/ics-section-head.html")); + String icsSectionFoot = FileUtils.loadFileToString(new File("resources/ics-section-foot.html")); + String icsTableRow = FileUtils.loadFileToString(new File("resources/ics-table-line.html")); + + StringBuffer result = new StringBuffer(); + + result.append(icsFileHead); + + int tableCounter = 0; + int sectionCounter = 1; + for (int i=0; i < myList.size(); i++) { + Clause clause = myList.get(i); + ArrayList clauseEntries = clauseMap.get(clause.toString()); + + if (clauseEntries != null && clauseEntries.size() > 0) { + tableCounter++; + sectionCounter++; + result.append(createSectionHead(icsSectionHead, "A.3." + sectionCounter, references.getProperty(clause.toString()), "A." + tableCounter)); + for (int j=0; j < clauseEntries.size(); j++) { + String purposeText = clauseEntries.get(j).getPurpose().getPurposeText(); + if (purposeText.startsWith("Ensure that")) { + purposeText = purposeText.replaceAll("^Ensure that", "").trim(); + String temp = purposeText.substring(0, 1).toUpperCase() + purposeText.substring(1); + purposeText = temp; + } + + result.append(createTableRow(icsTableRow, j+1, purposeText, "Clause " + clause, "m", clauseEntries.get(j).getFile().getName().replaceAll("\\.ttcn", ""))); + } + result.append(icsSectionFoot); + } + + } + + result.append(icsFileFooter); + + //System.out.println(result.toString()); + FileUtils.saveStringToFile(new File(config.get("DeliverableATSPath")+"/stf475-ics.html"), result.toString()); + + } catch (IOException e) { + e.printStackTrace(); + } + + + +// for (int i=0; i < myList.size(); i++) { +// String clauseDesc = references.getProperty(myList.get(i).toString()); +// System.out.println(myList.get(i) + " - " + clauseDesc); +// } +// System.out.println("----"); + + + System.out.println("done."); + } + + // ----------------------------------------------------------------------------------------------- + + private String createTableRow(String tableRow, int number, String purpose, String clause, String status, String tpRef) throws IOException { + String icsTableRow = tableRow.replaceAll("\\{\\{NUMBER\\}\\}", Integer.toString(number)); + icsTableRow = icsTableRow.replaceAll("\\{\\{PURPOSE\\}\\}", purpose); + icsTableRow = icsTableRow.replaceAll("\\{\\{CLAUSE\\}\\}", clause); + icsTableRow = icsTableRow.replaceAll("\\{\\{STATUS\\}\\}", status); + icsTableRow = icsTableRow.replaceAll("\\{\\{TCTPREF\\}\\}", tpRef); + + return icsTableRow; + + } + + private String createSectionHead(String sectionHead, String targetClause, String clauseDescription, String tableNumber) { + String icsSectionHead = sectionHead.replaceAll("\\{\\{TARGETCLAUSE\\}\\}", targetClause); + icsSectionHead = icsSectionHead.replaceAll("\\{\\{CLAUSEDESCRIPTION\\}\\}", clauseDescription); + icsSectionHead = icsSectionHead.replaceAll("\\{\\{TABLENUMBER\\}\\}", tableNumber); + return icsSectionHead; + } + + // ----------------------------------------------------------------------------------------------- + + public static void main(String[] args) { + new ICSProformaTableGenerator().run(); + } + +} diff --git a/tools/STF475Tools/src/Logger.java b/tools/STF475Tools/src/Logger.java new file mode 100644 index 0000000000000000000000000000000000000000..f457d0f71bc4fd781ef4f9849e9c3847d44a999c --- /dev/null +++ b/tools/STF475Tools/src/Logger.java @@ -0,0 +1,88 @@ +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +public class Logger { + private File allLogFile; + private File criticalLogFile; + private BufferedWriter allOut; + private BufferedWriter criticalOut; + + public Logger(File allLogFile, File criticalLogFile) { + this.allLogFile = allLogFile; + this.criticalLogFile = criticalLogFile; + } + + public void init() { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath()); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath()); + criticalOut = new BufferedWriter(criticalFStream); + allOut.write(""); + criticalOut.write(""); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void writeScreen(String str) { + System.out.println(str); + } + + public void writeAll(String str) { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath(),true); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath(), true); + criticalOut = new BufferedWriter(criticalFStream); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.write(str); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void writeCritical(String str) { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath(),true); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath(), true); + criticalOut = new BufferedWriter(criticalFStream); + } catch (IOException e) { + e.printStackTrace(); + } + try { + criticalOut.write(str); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void finish() { +// try { +// allOut.close(); +// criticalOut.close(); +// } catch (IOException e) { +// } + } +} diff --git a/tools/STF475Tools/src/Main.java b/tools/STF475Tools/src/Main.java new file mode 100644 index 0000000000000000000000000000000000000000..db843d93d51cf6119bc73133959b7f44c760d395 --- /dev/null +++ b/tools/STF475Tools/src/Main.java @@ -0,0 +1,30 @@ +import java.io.File; +import java.io.IOException; +import java.util.Properties; + +/** + * Calls the required java tools in the right order + */ +public class Main { + + public static void main(String[] args) { + Properties config = new Properties(); + try { + FileUtils.loadConfig(config); + String atsPath = config.get("ATSPath").toString(); + String deliverableATSPath = config.get("DeliverableATSPath").toString(); + System.out.println("Processing ATS from "+new File(atsPath).getCanonicalFile().getAbsolutePath()+" ..."); + System.out.println("Output ATS and Documents will be generated to "+new File(deliverableATSPath).getCanonicalFile().getAbsolutePath()+" ..."); + } catch (IOException e) { + System.err.println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + DeliverableGenerator.main(args); + TestSuiteStructureGenerator.main(args); + ICSProformaTableGenerator.main(args); + TestPurposeGenerator.main(args); + CoverageLister.main(args); + } + +} diff --git a/tools/STF475Tools/src/T3ExpectedOutput.java b/tools/STF475Tools/src/T3ExpectedOutput.java new file mode 100644 index 0000000000000000000000000000000000000000..843ef80ee0d58bd1cd8c3fc6e65d0bbbb2990974 --- /dev/null +++ b/tools/STF475Tools/src/T3ExpectedOutput.java @@ -0,0 +1,27 @@ +public class T3ExpectedOutput { + private String expectedOutput; + private String executionResult; + + public String getExpectedOutput() { + return expectedOutput; + } + + public void setExpectedOutput(String expectedOutput) { + this.expectedOutput = expectedOutput; + } + + public String getExecutionResult() { + return executionResult; + } + + public void setExecutionResult(String executionResult) { + this.executionResult = executionResult; + } + + @Override + public String toString() { + return "T3ExpectedOutput [expectedOutput=" + expectedOutput + + ", executionResult=" + executionResult + "]"; + } + +} diff --git a/tools/STF475Tools/src/T3Purpose.java b/tools/STF475Tools/src/T3Purpose.java new file mode 100644 index 0000000000000000000000000000000000000000..6d4b509dc9c588c9def244506618331b79e91859 --- /dev/null +++ b/tools/STF475Tools/src/T3Purpose.java @@ -0,0 +1,46 @@ +public class T3Purpose { + private int partReference; + private String clause; + private Clause clauseStructured; + private String purposeText; + + public int getPartReference() { + return partReference; + } + + public void setPartReference(int partReference) { + this.partReference = partReference; + } + + public String getClause() { + return clause; + } + + public void setClause(String clause) { + this.clause = clause; + clauseStructured = new Clause(clause); + } + + public String getPurposeText() { + return purposeText; + } + + public void setPurposeText(String purposeText) { + this.purposeText = purposeText; + } + + public Clause getClauseStructured() { + return clauseStructured; + } + + public void setClauseStructured(Clause clauseStructured) { + this.clauseStructured = clauseStructured; + } + + @Override + public String toString() { + return "T3Purpose [partReference=" + partReference + ", clause=" + + clause + ", purposeText=" + purposeText + "]"; + } + +} diff --git a/tools/STF475Tools/src/TSSClause.java b/tools/STF475Tools/src/TSSClause.java new file mode 100644 index 0000000000000000000000000000000000000000..168c1eef183bf95fcf34284f59322b9de5ad980e --- /dev/null +++ b/tools/STF475Tools/src/TSSClause.java @@ -0,0 +1,34 @@ +import java.util.ArrayList; +import java.util.List; + +public class TSSClause { + private String clauseName; + private List testCases = new ArrayList(); + + public String getClauseName() { + return clauseName; + } + + public void setClauseName(String clauseName) { + this.clauseName = clauseName; + } + + public List getTestCases() { + return testCases; + } + + public void addTestCase(String name) { + testCases.add(name); + } + + public void setTestCases(List testCases) { + this.testCases = testCases; + } + + @Override + public String toString() { + return "TSSClause [clauseName=\n" + clauseName + ", \ntestCases=\n" + + testCases + "]"; + } + +} diff --git a/tools/STF475Tools/src/TSSRow.java b/tools/STF475Tools/src/TSSRow.java new file mode 100644 index 0000000000000000000000000000000000000000..cf39fc7af5008935dcef71a8c6f4b004d8d3f098 --- /dev/null +++ b/tools/STF475Tools/src/TSSRow.java @@ -0,0 +1,110 @@ +import java.util.ArrayList; +import java.util.List; + +public class TSSRow { + private List clauses = new ArrayList(); + private String chapter; + + private String tablePart1 = " \r\n" + + " \r\n" + + " \r\n" + ""; + + private String tablePart2 = " "; + private String tablePart3 = " \r\n"; + private String tablePart5 = " \r\n" + + " \r\n"; + + private String tdPart1 = " \r\n" + ""; + + public List getClauses() { + return clauses; + } + + public void addClause(TSSClause clause) { + clauses.add(clause); + } + + public void setClauses(List clauses) { + this.clauses = clauses; + } + + public String getChapter() { + return chapter; + } + + public void setChapter(String chapter) { + this.chapter = chapter; + } + + @Override + public String toString() { + return "TSSRow [\nclauses=" + clauses + ", \nchapter=" + chapter + "]"; + } + + public String toHtml() { + StringBuffer result = new StringBuffer(); + + int totalTestCaseCount = 0; + for (int i = 0; i < clauses.size(); i++) { + totalTestCaseCount += clauses.get(i).getTestCases().size(); + } + + for (int i = 0; i < clauses.size(); i++) { + int testCasesCount = clauses.get(i).getTestCases().size(); + + for (int j = 0; j < clauses.get(i).getTestCases().size(); j++) { + String testCase = clauses.get(i).getTestCases().get(j); + if ((i==0) && (j==0)) { + String tPart1 = tablePart1.replaceAll("\\{\\{ROWSPANDOUBLE\\}\\}", + Integer.toString(totalTestCaseCount)).replaceAll( + "\\{\\{ROWSPANHALF\\}\\}", + Integer.toString(testCasesCount)).replaceAll("\\{\\{CHAPTER\\}\\}", getChapter()).replaceAll("\\{\\{CLAUSE\\}\\}", clauses.get(i).getClauseName()); + result.append(tPart1); + String tdPart = tdPart1.replaceAll("\\{\\{TESTCASE\\}\\}", testCase); + result.append(tdPart); + result.append(tablePart2); + + } else if ((i > 0) && (j==0)) { + String tPart2 = tablePart5.replaceAll("\\{\\{CLAUSE\\}\\}", clauses.get(i).getClauseName()).replaceAll( + "\\{\\{ROWSPANHALF\\}\\}", + Integer.toString(testCasesCount)).replaceAll("\\{\\{TESTCASE\\}\\}", testCase); + result.append(tPart2); + String tdPart = tdPart1.replaceAll("\\{\\{TESTCASE\\}\\}", testCase); + result.append(tdPart); + result.append(tablePart2); + } else if (j > 0) { + result.append(tablePart3); + String tdPart = tdPart1.replaceAll("\\{\\{TESTCASE\\}\\}", testCase); + result.append(tdPart); + result.append(tablePart2); + } + + } + + result.append(tablePart2); + } + + return result.toString(); + } + +} diff --git a/tools/STF475Tools/src/TSSTable.java b/tools/STF475Tools/src/TSSTable.java new file mode 100644 index 0000000000000000000000000000000000000000..2c7fdd14187680a95c9953c2ec853b3bbe50930d --- /dev/null +++ b/tools/STF475Tools/src/TSSTable.java @@ -0,0 +1,33 @@ +import java.util.ArrayList; +import java.util.List; + +public class TSSTable { + private List rows = new ArrayList(); + + public List getRows() { + return rows; + } + + public void addRow(TSSRow row) { + rows.add(row); + } + + public void setRows(List rows) { + this.rows = rows; + } + + @Override + public String toString() { + return "TSSTable [rows=\n" + rows + "]"; + } + + public String toHtml() { + StringBuffer result = new StringBuffer(); + for (int i=0; i < rows.size(); i++) { + TSSRow row = rows.get(i); + result.append(row.toHtml()); + } + return result.toString(); + } + +} diff --git a/tools/STF475Tools/src/TestPurposeGenerator.java b/tools/STF475Tools/src/TestPurposeGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..b1a59cdcc2f1ec710728ee5171391075b1ede379 --- /dev/null +++ b/tools/STF475Tools/src/TestPurposeGenerator.java @@ -0,0 +1,289 @@ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +public class TestPurposeGenerator { + + public static Properties config = new Properties(); + public static Properties references = new Properties(); + private ArrayList files = new ArrayList(); + private HashMap> clauseMapPositiveSemantical = new HashMap>(); + private HashMap> clauseMapNegativeSemantical = new HashMap>(); + + // ----------------------------------------------------------------------------------------------- + + public TestPurposeGenerator() { + } + + // ----------------------------------------------------------------------------------------------- + + public void run() { + System.out.println("STF475 Tools: Test Purpose Generator v0.1"); + try { + FileUtils.loadConfig(config); + FileUtils.loadReferences(references); + } catch (IOException e) { + System.err + .println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + List myList = new ArrayList(); + Iterator it = references.keySet().iterator(); + System.out.println("----"); + while (it.hasNext()) { + Object value = it.next(); + if (value instanceof String) { + myList.add(new Clause((String) value)); + } + } + + Collections.sort(myList); + + String atsPath = config.get("ATSPath").toString(); + System.out.println("Gathering files..."); + FileUtils.visitAllFiles(new File(atsPath), files); + + System.out.println("Processing files..."); + for (int i=0; i < files.size(); i++) { +// File tempFile = new File(config.get("TempPath") + "/" + files.get(i).getName()); + File currentFile = files.get(i); + System.out.println("processing " + currentFile.getName()); +// System.out.println(tempFile.getAbsolutePath()); + T3Purpose purpose = FileUtils.extractPurpose(currentFile); + + if (purpose.getClauseStructured() == null || purpose.getClause() == null) { + System.err.println("Skipping file: Error processing purpose for file "+currentFile.getAbsolutePath()); + continue; + } + + T3ExpectedOutput expected = FileUtils.extractExpectedOutput(currentFile); + + + if (files.get(i).getName().toLowerCase().startsWith("neg")) { + ArrayList clauseEntries = clauseMapNegativeSemantical.get(purpose.getClauseStructured().toString()); + if (clauseEntries == null) + clauseEntries = new ArrayList(); + + ClauseEntry clauseEntry = new ClauseEntry(); + clauseEntry.setFile(currentFile); + clauseEntry.setPurpose(purpose); + clauseEntry.setExpected(expected); + clauseEntries.add(clauseEntry); + clauseMapNegativeSemantical.put(purpose.getClauseStructured().toString(), clauseEntries); + } else { // pos + ArrayList clauseEntries = clauseMapPositiveSemantical.get(purpose.getClauseStructured().toString()); + if (clauseEntries == null) + clauseEntries = new ArrayList(); + + ClauseEntry clauseEntry = new ClauseEntry(); + clauseEntry.setFile(currentFile); + clauseEntry.setPurpose(purpose); + clauseEntry.setExpected(expected); + clauseEntries.add(clauseEntry); + clauseMapPositiveSemantical.put(purpose.getClauseStructured().toString(), clauseEntries); + } + } + + try { + String tpFileHead = FileUtils.loadFileToString(new File("resources/tp-file-head.html")); + String tpFileFooter = FileUtils.loadFileToString(new File("resources/tp-file-foot.html")); + String tpSectionHead = FileUtils.loadFileToString(new File("resources/tp-section-head.html")); + String tpSectionFoot = FileUtils.loadFileToString(new File("resources/tp-section-foot.html")); + String tpTable = FileUtils.loadFileToString(new File("resources/tp-table.html")); + + StringBuffer result = new StringBuffer(); + result.append(tpFileHead); + + int clauseCounter = 1; + for (int i=0; i < myList.size(); i++) { + Clause clause = myList.get(i); + ArrayList clauseEntriesPositiveSemantical = null; + ArrayList clauseEntriesNegativeSemantical = null; + + clauseEntriesPositiveSemantical = clauseMapPositiveSemantical.get(clause.toString()); + clauseEntriesNegativeSemantical = clauseMapNegativeSemantical.get(clause.toString()); + + int totalEntries = 0; + if (clauseEntriesPositiveSemantical != null) + totalEntries += clauseEntriesPositiveSemantical.size(); + if (clauseEntriesNegativeSemantical != null) + totalEntries += clauseEntriesNegativeSemantical.size(); + + if (totalEntries > 0) { +// result.append(createSection(tpSectionHead, "A.2." + Integer.toString(clauseCounter), references.getProperty(clause.toString()) + " (Clause " + clause.toString() + ")")); + result.append(createSection(tpSectionHead, "A.2." + Integer.toString(clauseCounter), references.getProperty(clause.toString()))); + + if (clauseEntriesPositiveSemantical != null) { + for (int j=0; j < clauseEntriesPositiveSemantical.size(); j++) { + ClauseEntry clauseEntries = clauseEntriesPositiveSemantical.get(j); + createTestPurposeEntry(tpTable, result, + clauseEntries); + } + } + + if (clauseEntriesNegativeSemantical != null) { + for (int j=0; j < clauseEntriesNegativeSemantical.size(); j++) { + ClauseEntry clauseEntries = clauseEntriesNegativeSemantical.get(j); + createTestPurposeEntry(tpTable, result, + clauseEntries); + } + } + + + result.append(tpSectionFoot); + clauseCounter++; + } + + + } + + result.append(tpFileFooter); + FileUtils.saveStringToFile(new File(config.getProperty("DeliverableATSPath")+"/stf475-tp.html"), result.toString()); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.println("done."); + } + + private void createTestPurposeEntry(String tpTable, StringBuffer result, + ClauseEntry clauseEntries) { + T3ExpectedOutput expected = clauseEntries.getExpected(); + T3Purpose purpose = clauseEntries.getPurpose(); + String tpId = "TP_" + clauseEntries.getFile().getName().replaceAll("\\.ttcn", ""); + String reference = expandPartReference(purpose.getPartReference()) + ", Clause " + purpose.getClauseStructured().toString(); + String ics = "None"; + String dependencies = "None"; + String summary = purpose.getPurposeText(); + String expectedText = expandExpected(expected); + String notes = ""; + result.append(createTestPurpose(tpTable, tpId, reference, ics, dependencies, summary, expectedText, notes)); + } + + private String expandExpected(T3ExpectedOutput e) { + if (e.getExpectedOutput().toLowerCase().contains("accept")) { + String result = "The TTCN-3 module shall be accepted by the tool "; + if (e.getExecutionResult().toLowerCase().contains("ttcn3verdict")) { + String v = e.getExecutionResult().toLowerCase().substring(e.getExecutionResult().toLowerCase().indexOf(':')+1); + result += "and all test cases have to produce the verdict " + v + " after execution."; + } else if (e.getExecutionResult().toLowerCase().contains("noexecution")) { + result += "without execution."; + } + return result; + } else if (e.getExpectedOutput().toLowerCase().contains("reject")) { + return "The TTCN-3 module shall be rejected by the validator or after/during execution."; + } + + return "FIXME"; + } + + private String expandPartReference(int i) { + if (i==1) { + return "ES 201 873-1 [1]"; + } + else if (i==4) { + return "ES 201 873-4 [1]"; + } + else if (i==9) { + return "ES 201 873-9 [1]"; + } + + return "FIXME"; + } + + private String createSection(String sectionString, String chapterNumber, String chapterString) { + return sectionString.replaceAll("\\{\\{CHAPTERNUMBER\\}\\}", chapterNumber).replaceAll("\\{\\{CHAPTERTITLE\\}\\}", chapterString); + } + + private String createTestPurpose(String tableString, String tpId, String ref, String ics, String dependencies, String summary, String expected, String notes) { + return tableString.replaceAll("\\{\\{TESTPURPOSEID\\}\\}", tpId) + .replaceAll("\\{\\{REFERENCE\\}\\}", ref) + .replaceAll("\\{\\{ICS\\}\\}", ics) + .replaceAll("\\{\\{DEPENDENCIES\\}\\}", dependencies) + .replaceAll("\\{\\{SUMMARY\\}\\}", summary) + .replaceAll("\\{\\{EXPECTEDOUTPUT\\}\\}", expected) + .replaceAll("\\{\\{NOTES\\}\\}", notes); + } + + @SuppressWarnings("unused") + private void createTable(List myList, String tableNumber, String tableDescription, String tssSectionHead, + String tssSectionFoot, HashMap> clauseMap, StringBuffer result) { + result.append(createSectionHead(tssSectionHead, tableNumber, tableDescription)); + TSSTable table = new TSSTable(); + + TSSRow row = null; + for (int i=0; i < myList.size(); i++) { + Clause clause = myList.get(i); + + ArrayList clauseEntries = null; + if (!clause.toString().contains(".")) { // top level + if (row != null) { + table.addRow(row); + row = null; + } + + clauseEntries = clauseMap.get(clause.toString()); + + row = new TSSRow(); + row.setChapter(clause.toString() + " " + references.getProperty(clause.toString())); + + if ((clauseEntries != null) && (clauseEntries.size() > 0)) { + TSSClause tssClause = new TSSClause(); + tssClause.setClauseName("Top level"); + for (int j=0; j < clauseEntries.size(); j++) { + ClauseEntry entry = clauseEntries.get(j); + tssClause.addTestCase(entry.getFile().getName().replaceAll("\\.ttcn", "")); + } + + row.addClause(tssClause); + } + } else { + clauseEntries = clauseMap.get(clause.toString()); + + if ((clauseEntries != null) && (clauseEntries.size() > 0)) { + TSSClause tssClause = new TSSClause(); + tssClause.setClauseName(clause.toString() + " " + references.getProperty(clause.toString())); + for (int j=0; j < clauseEntries.size(); j++) { + ClauseEntry entry = clauseEntries.get(j); + tssClause.addTestCase(entry.getFile().getName().replaceAll("\\.ttcn", "")); + } + row.addClause(tssClause); + } + } + } + result.append(table.toHtml()); + result.append(tssSectionFoot); + } + + // ----------------------------------------------------------------------------------------------- + +// private String createTableRow(String tableRow, int number, String purpose, String clause, String status, String tpRef) throws IOException { +// String icsTableRow = tableRow.replaceAll("\\{\\{NUMBER\\}\\}", Integer.toString(number)); +// icsTableRow = icsTableRow.replaceAll("\\{\\{PURPOSE\\}\\}", purpose); +// icsTableRow = icsTableRow.replaceAll("\\{\\{CLAUSE\\}\\}", clause); +// icsTableRow = icsTableRow.replaceAll("\\{\\{STATUS\\}\\}", status); +// icsTableRow = icsTableRow.replaceAll("\\{\\{TCTPREF\\}\\}", tpRef); +// +// return icsTableRow; +// +// } + + private String createSectionHead(String sectionHead, String tableNumber, String tableDescription) { + String newSectionHead = sectionHead.replaceAll("\\{\\{TABLENUMBER\\}\\}", tableNumber); + newSectionHead = newSectionHead.replaceAll("\\{\\{TABLEDESCRIPTION\\}\\}", tableDescription); + return newSectionHead; + } + + // ----------------------------------------------------------------------------------------------- + + public static void main(String[] args) { + new TestPurposeGenerator().run(); + } + +} diff --git a/tools/STF475Tools/src/TestSuiteStructureGenerator.java b/tools/STF475Tools/src/TestSuiteStructureGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..755498142d5e2751b653fa675e646b789dbc0548 --- /dev/null +++ b/tools/STF475Tools/src/TestSuiteStructureGenerator.java @@ -0,0 +1,194 @@ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; + +public class TestSuiteStructureGenerator { + + public static Properties config = new Properties(); + public static Properties references = new Properties(); + private ArrayList files = new ArrayList(); + private HashMap> clauseMapPositive = new HashMap>(); + private HashMap> clauseMapNegative = new HashMap>(); + + // ----------------------------------------------------------------------------------------------- + + public TestSuiteStructureGenerator() { + } + + // ----------------------------------------------------------------------------------------------- + + public void run() { + System.out.println("STF475 Tools: Test Suite Structure Tables Generator v0.1"); + try { + FileUtils.loadConfig(config); + FileUtils.loadReferences(references); + } catch (IOException e) { + System.err + .println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + List myList = new ArrayList(); + Iterator it = references.keySet().iterator(); + System.out.println("----"); + while (it.hasNext()) { + Object value = it.next(); + if (value instanceof String) { + myList.add(new Clause((String) value)); + } + } + + Collections.sort(myList); + try { + + String atsPath = config.get("ATSPath").toString(); + System.out.println("Gathering files..."); + FileUtils.visitAllFiles(new File(atsPath), files); + + System.out.println("Processing files..."); + for (int i=0; i < files.size(); i++) { + // File tempFile = new File(config.get("TempPath") + "/" + files.get(i).getName()); + File tempFile = files.get(i); //new File(config.get("TempPath") + "/" + files.get(i).getName()); + // try { + // FileUtils.copyFile(files.get(i), tempFile); + // } catch (IOException e) { + // e.printStackTrace(); + // } + T3Purpose purpose = FileUtils.extractPurpose(tempFile); + T3ExpectedOutput expected = FileUtils.extractExpectedOutput(tempFile); + // System.out.println(purpose.getClauseStructured()); + + // System.out.println("processing " + files.get(i).getName()); + Clause clauseStructured = purpose.getClauseStructured(); + if (clauseStructured == null) { + throw new IOException("Error scanning structured clause for file "+tempFile+" purpose: "+ purpose.toString()); + } + if (files.get(i).getName().toLowerCase().startsWith("neg")) { + ArrayList clauseEntries = clauseMapNegative.get(clauseStructured.toString()); + if (clauseEntries == null) + clauseEntries = new ArrayList(); + + ClauseEntry clauseEntry = new ClauseEntry(); + clauseEntry.setFile(tempFile); + clauseEntry.setPurpose(purpose); + clauseEntry.setExpected(expected); + clauseEntries.add(clauseEntry); + clauseMapNegative.put(clauseStructured.toString(), clauseEntries); + } else { + ArrayList clauseEntries = clauseMapPositive.get(clauseStructured.toString()); + if (clauseEntries == null) + clauseEntries = new ArrayList(); + + ClauseEntry clauseEntry = new ClauseEntry(); + clauseEntry.setFile(tempFile); + clauseEntry.setPurpose(purpose); + clauseEntry.setExpected(expected); + clauseEntries.add(clauseEntry); + clauseMapPositive.put(clauseStructured.toString(), clauseEntries); + } + } + + + String tssFileHead = FileUtils.loadFileToString(new File("resources/tss-file-head.html")); + String tssFileFooter = FileUtils.loadFileToString(new File("resources/tss-file-foot.html")); + String tssSectionHead = FileUtils.loadFileToString(new File("resources/tss-section-head.html")); + String tssSectionFoot = FileUtils.loadFileToString(new File("resources/tss-section-foot.html")); + + StringBuffer result = new StringBuffer(); + result.append(tssFileHead); + + // positive tests + createTable(myList, "B.1", "Test suite structure, positive tests", tssSectionHead, tssSectionFoot, clauseMapPositive, result); + + // negative tests + createTable(myList, "B.2", "Test suite structure, negative tests", tssSectionHead, tssSectionFoot, clauseMapNegative, result); + + result.append(tssFileFooter); + FileUtils.saveStringToFile(new File(config.getProperty("DeliverableATSPath")+"/stf475-tss.html"), result.toString()); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.println("done."); + } + + private void createTable(List myList, String tableNumber, String tableDescription, String tssSectionHead, + String tssSectionFoot, HashMap> clauseMap, StringBuffer result) { + result.append(createSectionHead(tssSectionHead, tableNumber, tableDescription)); + TSSTable table = new TSSTable(); + + TSSRow row = null; + for (int i=0; i < myList.size(); i++) { + Clause clause = myList.get(i); + + ArrayList clauseEntries = null; + if (!clause.toString().contains(".")) { // top level + if (row != null) { + table.addRow(row); + row = null; + } + + clauseEntries = clauseMap.get(clause.toString()); + + row = new TSSRow(); + row.setChapter(clause.toString() + " " + references.getProperty(clause.toString())); + + if ((clauseEntries != null) && (clauseEntries.size() > 0)) { + TSSClause tssClause = new TSSClause(); + tssClause.setClauseName("Top level"); + for (int j=0; j < clauseEntries.size(); j++) { + ClauseEntry entry = clauseEntries.get(j); + tssClause.addTestCase(entry.getFile().getName().replaceAll("\\.ttcn", "")); + } + + row.addClause(tssClause); + } + } else { + clauseEntries = clauseMap.get(clause.toString()); + + if ((clauseEntries != null) && (clauseEntries.size() > 0)) { + TSSClause tssClause = new TSSClause(); + tssClause.setClauseName(clause.toString() + " " + references.getProperty(clause.toString())); + for (int j=0; j < clauseEntries.size(); j++) { + ClauseEntry entry = clauseEntries.get(j); + tssClause.addTestCase(entry.getFile().getName().replaceAll("\\.ttcn", "")); + } + row.addClause(tssClause); + } + } + } + result.append(table.toHtml()); + result.append(tssSectionFoot); + } + + // ----------------------------------------------------------------------------------------------- + + // private String createTableRow(String tableRow, int number, String purpose, String clause, String status, String tpRef) throws IOException { + // String icsTableRow = tableRow.replaceAll("\\{\\{NUMBER\\}\\}", Integer.toString(number)); + // icsTableRow = icsTableRow.replaceAll("\\{\\{PURPOSE\\}\\}", purpose); + // icsTableRow = icsTableRow.replaceAll("\\{\\{CLAUSE\\}\\}", clause); + // icsTableRow = icsTableRow.replaceAll("\\{\\{STATUS\\}\\}", status); + // icsTableRow = icsTableRow.replaceAll("\\{\\{TCTPREF\\}\\}", tpRef); + // + // return icsTableRow; + // + // } + + private String createSectionHead(String sectionHead, String tableNumber, String tableDescription) { + String newSectionHead = sectionHead.replaceAll("\\{\\{TABLENUMBER\\}\\}", tableNumber); + newSectionHead = newSectionHead.replaceAll("\\{\\{TABLEDESCRIPTION\\}\\}", tableDescription); + return newSectionHead; + } + + // ----------------------------------------------------------------------------------------------- + + public static void main(String[] args) { + new TestSuiteStructureGenerator().run(); + } + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/.classpath b/tools/TTworkbenchSupport/TTworkbenchAdapter/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..9df91c279eb6f25d656404dc353ed8eadfb0cdd2 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/.project b/tools/TTworkbenchSupport/TTworkbenchAdapter/.project new file mode 100644 index 0000000000000000000000000000000000000000..dc24288341383edf0a90a21a4282ba948d5829e0 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/.project @@ -0,0 +1,33 @@ + + + TTworkbenchAdapter + + + + + + com.testingtech.ttworkbench.ttthree.modelBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.testingtech.ttworkbench.ttthree.todoBuilder + + + + + com.testingtech.ttworkbench.ttthree.tt3pluginbuilder + + + + + + com.testingtech.ttworkbench.core.ttcn3nature + org.eclipse.jdt.core.javanature + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.core.prefs b/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..8ef3a8c18e6fab3a0c018fe62b2aad7605c31dfe --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.core.prefs @@ -0,0 +1,23 @@ +clf.output_folder=//PROJECT_NAME//clf +clf.output_same_as_binary=false +eclipse.preferences.version=1 +environment.append=true +environment.variables= +tt3-plugins-path=//PROJECT_NAME//tt3plugins;//PROJECT_NAME//tt3plugins_generated +ttcn3.continue_on_fail=false +ttcn3.gen_debug_code_record_init=false +ttcn3.generate_mlf=false +ttcn3.java_compile_all_at_once=true +ttcn3.main_module= +ttcn3.mlf_class= +ttcn3.mlf_class_builtin=com.testingtech.ttcn.tri.PluginTestAdapter +ttcn3.mlf_jar= +ttcn3.mlf_radiobutton=1 +ttcn3.mlf_ta_config= +ttcn3.output_folder=//PROJECT_NAME//ttcn3build +ttcn3.output_same_as_src=false +ttcn3.save_log_automatically=false +ttcn3.source_folders=//PROJECT_NAME//ttcn3/Pos_050102_includes_001\n//PROJECT_NAME//ttcn3/Pos_060301_integer_001\n//PROJECT_NAME//ttcn3/Pos_060108_maxinclusive_001 +ttcn3.tlz.output_folder= +ttcn3.use_bigint=false +ttcn3.use_destination_path_for_ttcn3view=false diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs b/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..b7f626ccb02f6529936c94b8a972f60f2248a8a7 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs @@ -0,0 +1,24 @@ +eclipse.preferences.version=1 +gen-xsd-codec=true +xsd-convert-sets-into-records=true +xsd-convert-unions-into-records-of-optionals=false +xsd-generate-all-fields-optional=false +xsd-generate-enumerations=true +xsd-implicitly-import-xsdaux=true +xsd-interleave-text-and-elements=false +xsd-mangle-attribute-names=false +xsd-mangle-element-names=false +xsd-mangle-names-standard-conform=true +xsd-map-any-to-anytype=false +xsd-map-optional-union-fields-to-record-of=true +xsd-map-substitution-groups-with-unions=false +xsd-map-subtyping-with-unions=false +xsd-merge-attributes-into-parent=true +xsd-merge-elements-into-parent=true +xsd-merge-namespaces-into-one-module=false +xsd-output-path=tt3plugins_generated +xsd-package-name= +xsd-profile=standard +xsd-replace-bad-chars-with-underscore=true +xsd-strip-namespaces=false +xsd-use-anyattribute-aux-type=false diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec.jardesc b/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec.jardesc new file mode 100644 index 0000000000000000000000000000000000000000..14103a8adc5fbbe3bc4d7f581e9bb78a1d68d4cf --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec.jardesc @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec/com/testingtech/tci/codec/RawAndXMLCodecPlugin.java b/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec/com/testingtech/tci/codec/RawAndXMLCodecPlugin.java new file mode 100644 index 0000000000000000000000000000000000000000..e10dba9bc36de0653fe8d261b6adbfcfce2aad54 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/RawAndXMLCodec/com/testingtech/tci/codec/RawAndXMLCodecPlugin.java @@ -0,0 +1,53 @@ +package com.testingtech.tci.codec; + +import java.nio.charset.Charset; + +import org.etsi.ttcn.tci.TciCDProvided; +import org.etsi.ttcn.tci.TciTypeClass; +import org.etsi.ttcn.tci.Type; +import org.etsi.ttcn.tci.Value; +import org.etsi.ttcn.tri.TriMessage; + +import com.testingtech.ttcn.extension.CodecProvider; +import com.testingtech.ttcn.tri.AbstractCodecPlugin; +import com.testingtech.xmlschema.codec.runtime.XMLCodecPlugin; + +import de.tu_berlin.cs.uebb.muttcn.runtime.RB; +import de.tu_berlin.cs.uebb.ttcn.runtime.BaseCharString; + +public class RawAndXMLCodecPlugin extends AbstractCodecPlugin implements CodecProvider { + + private XMLCodecPlugin xmlCodec; + + @Override + public boolean setUp() { + boolean setUpResult = super.setUp(); + xmlCodec = new XMLCodecPlugin(); + xmlCodec.initAbstractPlugin(getRB()); + setUpResult |= xmlCodec.setUp(); + return setUpResult; + } + + @Override + public Value decode(TriMessage message, Type decodingHypothesis) { + if ("Raw".equals(decodingHypothesis.getName())) { + if (decodingHypothesis.getTypeClass() == TciTypeClass.CHARSTRING || + decodingHypothesis.getTypeClass() == TciTypeClass.UNIVERSAL_CHARSTRING) { + BaseCharString string = (BaseCharString) decodingHypothesis.newInstance(); + string.setString(new String(message.getEncodedMessage(), Charset.forName("UTF-8"))); + return string; + } + } + return xmlCodec.decode(message, decodingHypothesis); + } + + @Override + public TriMessage encode(Value value) { + return xmlCodec.encode(value); + } + + public TciCDProvided getCodec(RB RB, String encodingRule) { + return new RawAndXMLCodecPlugin(); + } + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction.jardesc b/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction.jardesc new file mode 100644 index 0000000000000000000000000000000000000000..5566d19e342ac9d1a28f9114cbd14334420ca1ac --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction.jardesc @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction/com/testingtech/tri/extfct/XmlDiffExtFctPlugin.java b/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction/com/testingtech/tri/extfct/XmlDiffExtFctPlugin.java new file mode 100644 index 0000000000000000000000000000000000000000..ad57d056c5e772e6d9eb0578b8fa05a10ff01e29 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/XmlDiffExternalFunction/com/testingtech/tri/extfct/XmlDiffExtFctPlugin.java @@ -0,0 +1,95 @@ +package com.testingtech.tri.extfct; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.text.MessageFormat; + +import org.etsi.mts.ttcn.part9.xmldiff.XmlDiff; +import org.etsi.ttcn.tci.BooleanValue; +import org.etsi.ttcn.tci.RecordOfValue; +import org.etsi.ttcn.tci.UniversalCharstringValue; + +import com.testingtech.ttcn.annotation.ExternalFunction; +import com.testingtech.ttcn.tri.AnnotationsExternalFunctionPlugin; +import com.testingtech.util.FileUtil; + +import de.tu_berlin.cs.uebb.muttcn.runtime.TestCaseError; + +@ExternalFunction.Definitions(XmlDiffExtFctPlugin.class) +public class XmlDiffExtFctPlugin extends AnnotationsExternalFunctionPlugin { + + /** + * Lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + // external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + @ExternalFunction(name = "matchFile") + public BooleanValue matchFile(UniversalCharstringValue p_textToMatch, + UniversalCharstringValue p_referenceXmlFile, RecordOfValue xsdFileList, UniversalCharstringValue p_matchError, UniversalCharstringValue p_referenceTTCN3File) { + String stringToMatch = p_textToMatch.getString(); + File parentFolder = new File(p_referenceTTCN3File.getString()).getAbsoluteFile().getParentFile(); + String strReferenceXmlFile = p_referenceXmlFile.getString(); + strReferenceXmlFile = new File(parentFolder, strReferenceXmlFile).getAbsolutePath(); + + String[] xsdFileArray = null; + if (xsdFileList.getLength() > 0) { + xsdFileArray = new String[xsdFileList.getLength()]; + for(int i = 0; i < xsdFileList.getLength(); i++) { + xsdFileArray[i] = ((UniversalCharstringValue)xsdFileList.getField(i)).getString(); + } + } + String description = ""; + boolean res = false; + try { + XmlDiff diff = new XmlDiff(strReferenceXmlFile, xsdFileArray, new String[]{parentFolder.getAbsolutePath()}); + StringBuilder sb = new StringBuilder(); + res = diff.diff(stringToMatch, sb); + if (sb.length() > 0) + description = sb.toString(); + } catch (Exception e) { + description = e.getMessage(); + } + if (!res && description == null) + description = "Unspecified error"; + + p_matchError.setString(description); + + return newBooleanValue(res); + } + + /** + * Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + // external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + @ExternalFunction(name = "readFile") + public UniversalCharstringValue readFile(UniversalCharstringValue p_referenceXmlFile, UniversalCharstringValue p_referenceTTCN3File) { + FileInputStream in = null; + try { + File referenceTTCN3File = new File(p_referenceTTCN3File.getString()); + String strReferenceXmlFile = p_referenceXmlFile.getString(); + File file = new File(referenceTTCN3File.getAbsoluteFile().getParentFile(), strReferenceXmlFile); + in = new FileInputStream(file); + ByteArrayOutputStream out = new ByteArrayOutputStream(4096); + FileUtil.copy(in, out); + return newUniversalCharstringValue(out.toString("UTF-8")); + } catch (Throwable e) { + throw new TestCaseError(new RuntimeException(MessageFormat.format("error while reading UTF-8 encoded file: {0} {1}", p_referenceXmlFile.getString(), e.toString()), e)); + } finally { + try { + in.close(); + } catch (Throwable e) { + // ignore exception + } + } + } + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/clf/TTworkbenchAdapter.clf b/tools/TTworkbenchSupport/TTworkbenchAdapter/clf/TTworkbenchAdapter.clf new file mode 100644 index 0000000000000000000000000000000000000000..a4fb713705b6d5c94c6f13218feee60ee08d24bc --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/clf/TTworkbenchAdapter.clf @@ -0,0 +1,38 @@ + + + + + + + + + + + The timeout given in seconds after which the test case will be stopped. + float + 5.0]]> + 5.0]]> + + + The timeout given in seconds after which the test case will be stopped. + float + 5.0]]> + 5.0]]> + + + The timeout given in seconds after which the test case will be stopped. + float + 5.0]]> + 5.0]]> + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/taconfig.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/taconfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..a67a55a3ceff1ee015a682f1b0ab21b9163d515f --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/taconfig.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/RawAndXMLCodec.jar b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/RawAndXMLCodec.jar new file mode 100644 index 0000000000000000000000000000000000000000..5b80b6c2259160f36cc2adff9db1a3210a031af5 Binary files /dev/null and b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/RawAndXMLCodec.jar differ diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/TT3plugin.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/TT3plugin.xml new file mode 100644 index 0000000000000000000000000000000000000000..380dce33c2e9263245bc764ebf63d1245311f2e7 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/RawAndXMLCodec/TT3plugin.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/TT3plugin.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/TT3plugin.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb2c4651357e64a10c15228a99e6a67dcd54408d --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/TT3plugin.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/XmlDiffExternalFunction.jar b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/XmlDiffExternalFunction.jar new file mode 100644 index 0000000000000000000000000000000000000000..08679e948f629ed712e64d2e2dfb00e00894d6fa Binary files /dev/null and b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/XmlDiffExternalFunction.jar differ diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmldiff.jar b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmldiff.jar new file mode 100644 index 0000000000000000000000000000000000000000..e3921c105bc6b868639e02bb59a26383bdc6138e Binary files /dev/null and b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmldiff.jar differ diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmlunit-1.5.jar b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmlunit-1.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..a195ffef4b9b22d10cdf27770496a901a1dfdc7f Binary files /dev/null and b/tools/TTworkbenchSupport/TTworkbenchAdapter/tt3plugins/XmlDiffExternalFunction/xmlunit-1.5.jar differ diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.ttcn b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c280e61e6ca58bbf064eaac01716b62efb3e55eb --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD include element information items shall be ignored if the included schema element has the same target +// namespace as the including one (implying the absence of the target namespace). + +module Pos_050102_includes_001 { + + import from schema_Pos_050102_includes_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_001.xml", { "Pos_050102_includes_001.xsd", "Pos_050102_includes_001_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..42f7278bdc8240fe066eb5829a95f87d34346174 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xsd b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..97c302167de98cbb94675d1a62a437db24401752 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8f3fadc4cad184fbf39332c2cd6a05b30b95c861 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a6b2337d2e22d07c3efe4675819990eb4baa3bca --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of elements of type integer with maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_001 { + + import from schema_Pos_060108_maxinclusive_001 language "XSD" all; + + template E1 m_msg := 100; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_001.xml", { "Pos_060108_maxinclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..802733f9cb420e2e6ba4c5a991e60c829b04aeee --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml @@ -0,0 +1,4 @@ + +100 diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d0f8c463c54343ca1c05dbf01e253307df0d9b5b --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.ttcn b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0809f1e27f3516c038536069488fc3ba9a45efd2 --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_001 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060301_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060301_integer_001.xml", { "Pos_060301_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060301_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xml b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebcae85df175928cb9cf4605efe806fa302a03cd --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xml @@ -0,0 +1 @@ +2147483647 \ No newline at end of file diff --git a/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xsd b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ca1fae531818fb18065223851c37edda6db9f60a --- /dev/null +++ b/tools/TTworkbenchSupport/TTworkbenchAdapter/ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/tools/TestCastSupport/.project b/tools/TestCastSupport/.project new file mode 100644 index 0000000000000000000000000000000000000000..e522cd1798b42da43a637fa01e4f5fdcb4bb79bc --- /dev/null +++ b/tools/TestCastSupport/.project @@ -0,0 +1,11 @@ + + + TestCastSupport + + + + + + + + diff --git a/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tci.dll b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tci.dll new file mode 100644 index 0000000000000000000000000000000000000000..47cfff7c424c6dfdc5bf0a75699dc6f42cee1ae7 Binary files /dev/null and b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tci.dll differ diff --git a/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tri.dll b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tri.dll new file mode 100644 index 0000000000000000000000000000000000000000..552c82428f1c07166b7ef44fd5024487844da300 Binary files /dev/null and b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.Tri.dll differ diff --git a/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.XTri.dll b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.XTri.dll new file mode 100644 index 0000000000000000000000000000000000000000..969381edf7ecf3e72e87af78e74b4a06087b4304 Binary files /dev/null and b/tools/TestCastSupport/LoopbackXmlTrap/Etsi.Ttcn3.XTri.dll differ diff --git a/tools/TestCastSupport/LoopbackXmlTrap/LoopbackXmlTrap.exe b/tools/TestCastSupport/LoopbackXmlTrap/LoopbackXmlTrap.exe new file mode 100644 index 0000000000000000000000000000000000000000..3c227efcdad3967d8bcc7930aaf90e42a73f9ca0 Binary files /dev/null and b/tools/TestCastSupport/LoopbackXmlTrap/LoopbackXmlTrap.exe differ diff --git a/tools/TestCastSupport/LoopbackXmlTrap/TestCast.Ttcn3.TriTci.dll b/tools/TestCastSupport/LoopbackXmlTrap/TestCast.Ttcn3.TriTci.dll new file mode 100644 index 0000000000000000000000000000000000000000..f7f2d129b1c5829859018e8e615cdb47a4308af4 Binary files /dev/null and b/tools/TestCastSupport/LoopbackXmlTrap/TestCast.Ttcn3.TriTci.dll differ diff --git a/tools/TestCastSupport/TestCastAdapter/loopback-part-9.cmd b/tools/TestCastSupport/TestCastAdapter/loopback-part-9.cmd new file mode 100644 index 0000000000000000000000000000000000000000..2b264ca3e13b123d3f241c9ad61d8ec5d732fbe0 --- /dev/null +++ b/tools/TestCastSupport/TestCastAdapter/loopback-part-9.cmd @@ -0,0 +1 @@ +java -jar "%~dp0loopback-part-9.jar" > "%~dp0log.txt" 2>&1 diff --git a/tools/TestCastSupport/TestCastAdapter/loopback-part-9.jar b/tools/TestCastSupport/TestCastAdapter/loopback-part-9.jar new file mode 100644 index 0000000000000000000000000000000000000000..f11219f2952fbff55702911d46bae396bc69ebf6 Binary files /dev/null and b/tools/TestCastSupport/TestCastAdapter/loopback-part-9.jar differ diff --git a/tools/TestCastSupport/TestCastAdapter/loopback-part-9_lib/xmlunit-1.5.jar b/tools/TestCastSupport/TestCastAdapter/loopback-part-9_lib/xmlunit-1.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..a195ffef4b9b22d10cdf27770496a901a1dfdc7f Binary files /dev/null and b/tools/TestCastSupport/TestCastAdapter/loopback-part-9_lib/xmlunit-1.5.jar differ diff --git a/tools/TestCastSupport/TestCastTestGenerator/Readme.txt b/tools/TestCastSupport/TestCastTestGenerator/Readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..a5862588d9aa8d01a602e5df599d1e3334e8768e --- /dev/null +++ b/tools/TestCastSupport/TestCastTestGenerator/Readme.txt @@ -0,0 +1,41 @@ +This tool is used for semiautomatic generation of STF 475 tests. + +Requirements: +1. .NET 4.0 +2. TestCast 6.7.4.7 or higher + +To install: +1. Compile macro processing tool: + a. Create a directory for the tool + b. Get the tool source code from svn (trunk/tools/TestMacroProcessor) + c. Compile the tool into executable jar file and place this file into the directory + d. Copy the config.properties and macro directory to the tool directory + e. Copy macro-processor.cmd to the tool directory + +2. Get LoopbackXmlTrap from svn (trunk/tools/TestCastSupport/LoopbackXmlTrap) + +3. Prepare Stf475TestGenerator: + a. Create a directory for the tool + b. Copy Stf475TestGenerator.exe and Stf475TestGenerator.exe.config to the tool directory + c. Update the paths in Stf475TestGenerator.exe.config: + - TestCastDir: directory where TestCast is installed + - MacroProcDir: directory of macro processing tool (created in point 1) + - TempDir: directory for storing temporary files + - LoopbackDir: directory of the LoopbackXmlTrap (see point 2) + +To use: +1. Launch Stf475TestGenerator.exe +2. Browse to the chapter folder of insert the path to the text box +3. Click on "Generate Files" +4. The tool will automatically create the test case folder, TTCN-3 template and XSD template. + Then it will start TestCast and open the generated files for editing. + The test case name is automatically inserted to text box in the tool for later use. +5. Once the editing is finished (XSD and TTCN-3 template are ready), the user should close + TestCast and click on "Execute" +6. The tool will resolve the macro and create an executable TTCN-3 file. Then it will use + TestCast command line tool to run the test. During the test, the content of produced + XML message is saved automatically and copied to the test case folder and verified + against the schema. Because the file will be used as the reference XML file the user + should check the content manually as well, especially if the schema supports optional + content. + \ No newline at end of file diff --git a/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe b/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe new file mode 100644 index 0000000000000000000000000000000000000000..6bc43fdbc416ac2791ca81d58bb26ce17236bd56 Binary files /dev/null and b/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe differ diff --git a/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe.config b/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe.config new file mode 100644 index 0000000000000000000000000000000000000000..29ba792427c2447956484c4a4c57e1e036b5dcd7 --- /dev/null +++ b/tools/TestCastSupport/TestCastTestGenerator/Stf475TestGenerator.exe.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tools/TestCastSupport/TestCastTestGenerator/macro-processor.cmd b/tools/TestCastSupport/TestCastTestGenerator/macro-processor.cmd new file mode 100644 index 0000000000000000000000000000000000000000..c3fcf55e2603a5f577542b36991389636012a606 --- /dev/null +++ b/tools/TestCastSupport/TestCastTestGenerator/macro-processor.cmd @@ -0,0 +1 @@ +java -jar macro-processor.jar \ No newline at end of file diff --git a/tools/TestCastSupport/TestCastTester/.classpath b/tools/TestCastSupport/TestCastTester/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..d171cd4c1231c688762ba221723f4b629bd7667d --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/tools/TestCastSupport/TestCastTester/.project b/tools/TestCastSupport/TestCastTester/.project new file mode 100644 index 0000000000000000000000000000000000000000..7ebf2a1f78549d69f3e8de23a4d5e9286ef8f2f3 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/.project @@ -0,0 +1,17 @@ + + + TestCastTester + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/tools/TestCastSupport/TestCastTester/.settings/org.eclipse.jdt.core.prefs b/tools/TestCastSupport/TestCastTester/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..838bd9d69424290f7e947b867a3b4381e756dad8 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/tools/TestCastSupport/TestCastTester/README.txt b/tools/TestCastSupport/TestCastTester/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..b41297eefc8dd339163a634c88f91917fa017526 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/README.txt @@ -0,0 +1,11 @@ + +Required: + + resource/TestCastTester.properties have to be adapted to your paths + +Build and Execute: + + run "ant" in the project folder to build it + +in order to run execute + java -jar dist/tcTester.jar diff --git a/tools/TestCastSupport/TestCastTester/TestCastTester.launch b/tools/TestCastSupport/TestCastTester/TestCastTester.launch new file mode 100644 index 0000000000000000000000000000000000000000..406b1deff018852721e58b95f9dcb503e3890f1f --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/TestCastTester.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tools/TestCastSupport/TestCastTester/build.xml b/tools/TestCastSupport/TestCastTester/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..ffac8c206b3e317ff8ad7ba10ada3cb5d7ab3e1b --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/build.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tools/TestCastSupport/TestCastTester/dist/tcTester.jar b/tools/TestCastSupport/TestCastTester/dist/tcTester.jar new file mode 100644 index 0000000000000000000000000000000000000000..626d0cf42034fe163a9312f76fa57e15f540ae51 Binary files /dev/null and b/tools/TestCastSupport/TestCastTester/dist/tcTester.jar differ diff --git a/tools/TestCastSupport/TestCastTester/resources/TestCastTester.properties b/tools/TestCastSupport/TestCastTester/resources/TestCastTester.properties new file mode 100644 index 0000000000000000000000000000000000000000..add5fc4cdba8a4ef5b07ea7e63959742f4037ce4 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/resources/TestCastTester.properties @@ -0,0 +1,6 @@ +TestCastCommandLineTool=C:/SVN/TestCast/Source/TestCastT3/VS2010/bin/x86/Debug/tc_cmd.exe +LoopbackAdapterPath=C:/SVN/SVN 475/trunk/tools/TestCastSupport/TestCastAdapter/loopback-part-9.cmd +TempPath=C:/Work/STF/STF 475/tmp +LogPath=C:/Work/STF/STF 475/log +ATSPath=C:/Work/STF/STF 521/Tmp/ +ATSPathX=C:/SVN/SVN 475/trunk/ATS/07_mapping_xsd_components/0701_attributes_of_xsd_component_declarations \ No newline at end of file diff --git a/tools/TestCastSupport/TestCastTester/resources/skipList.txt b/tools/TestCastSupport/TestCastTester/resources/skipList.txt new file mode 100644 index 0000000000000000000000000000000000000000..062af5fc90406dac72efe95b366ce301b90a5ded --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/resources/skipList.txt @@ -0,0 +1,27 @@ +NegSem_0503_Ordering_002 +NegSem_0503_Ordering_003 +Sem_0505_cyclic_definitions_002 +NegSem_06010203_Ranges_003 +NegSyn_0602_TopLevel_004 +Sem_060302_structured_types_002 +Sem_070105_BitwiseOperators_001 +Sem_070106_ShiftOperators_003 +NegSyn_0801_DefinitionOfAModule_001 +Sem_08020302_ImportingSingleDefinitions_002 +Sem_08020303_ImportingGroups_002 +Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_001 +Syn_08020306_ImportingDefinitionsFromOtherT3EditionsAndFromNonT3Modules_002 +Sem_1503_GlobalAndLocalTemplates_002 +NegSem_150603_ReferencingRecordOfAndSetElements_001 +Sem_150603_ReferencingRecordOfAndSetElements_001 +Sem_150603_ReferencingRecordOfAndSetElements_002 +Sem_150603_ReferencingRecordOfAndSetElements_003 +Sem_150603_ReferencingRecordOfAndSetElements_004 +Sem_150603_ReferencingRecordOfAndSetElements_005 +Sem_1601_toplevel_002 +Sem_160102_predefined_functions_002 +Sem_160102_predefined_functions_003 +Sem_160102_predefined_functions_005 +Syn_1907_label_statement_001 +Sem_B010401_length_restrictions_002 +Sem_B0105_toplevel_001 \ No newline at end of file diff --git a/tools/TestCastSupport/TestCastTester/src/Clipboard2JavaString.java b/tools/TestCastSupport/TestCastTester/src/Clipboard2JavaString.java new file mode 100644 index 0000000000000000000000000000000000000000..242a5e0d737336de767487dadcdda5f9d0bfef20 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/Clipboard2JavaString.java @@ -0,0 +1,33 @@ +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import javax.swing.JFrame; + +public class Clipboard2JavaString extends JFrame { + private static final long serialVersionUID = 1L; + Clipboard clipboard = null; + + public void run() { + if (clipboard == null) + clipboard = getToolkit().getSystemClipboard(); + Transferable clipData = clipboard.getContents(this); + String s; + try { + s = (String) (clipData.getTransferData(DataFlavor.stringFlavor)); + String[] strings = s.split("[\r\n]+"); + for (int i = 0; i < strings.length; i++) { + if (i < strings.length - 1) + System.out.println("\"" + strings[i] + "\\n\" + "); + else + System.out.println("\"" + strings[i] + "\";"); + } + } catch (Exception ee) { + ee.printStackTrace(); + } + + } + + public static void main(String[] args) { + new Clipboard2JavaString().run(); + } +} diff --git a/tools/TestCastSupport/TestCastTester/src/FileUtils.java b/tools/TestCastSupport/TestCastTester/src/FileUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..95105d092969706cf5cf791cfa9fc2361e617ed1 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/FileUtils.java @@ -0,0 +1,262 @@ +import java.io.BufferedReader; +import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class FileUtils { + + public static boolean visitAllFiles(File f, ArrayList files) { + boolean bRes = false; + if (f.isDirectory()) { + String[] children = f.list(); + ArrayList t3Files = null, xsdFiles = null, directories = null; + File xmlFile = null; + for (int i = 0; i < children.length; i++) { + File localFile = new File(f, children[i]); + if (localFile.isDirectory()) { + if (!visitAllFiles(localFile, files)) { + if (directories == null) + directories = new ArrayList(); + directories.add(localFile); + } + } + else { + String fileName = localFile.toString(); + if (fileName.endsWith(".ttcn")) { + if (t3Files == null) + t3Files = new ArrayList(); + t3Files.add(localFile); + } else if (fileName.endsWith(".xsd")) { + if (xsdFiles == null) + xsdFiles = new ArrayList(); + xsdFiles.add(localFile); + } else if (fileName.endsWith(".xml")) { + xmlFile = localFile; + } + } + } + if (t3Files == null) + return false; + for(File t3File : t3Files) { + files.add(new T3ScriptFile(t3File, xsdFiles, xmlFile, directories)); + bRes = true; + } + } else if (f.toString().endsWith(".ttcn")) { + files.add(new T3ScriptFile(f, null, null, null)); + bRes = true; + } + return bRes; + } + + // ----------------------------------------------------------------------------------------------- + + public static void loadConfig(Properties config) throws IOException { + FileInputStream fis = new FileInputStream( + "resources/TestCastTester.properties"); + config.load(fis); + fis.close(); + if ((config.get("TestCastCommandLineTool") == null) + || (config.get("LoopbackAdapterPath") == null) + || (config.get("TempPath") == null) + || (config.get("LogPath") == null) + || (config.get("ATSPath") == null)) { + throw new IOException(); + } + } + + // ----------------------------------------------------------------------------------------------- + + public static void copyFile(File in, File out) throws IOException { + FileChannel inChannel = new FileInputStream(in).getChannel(); + FileChannel outChannel = new FileOutputStream(out).getChannel(); + try { + inChannel.transferTo(0, inChannel.size(), outChannel); + } catch (IOException e) { + throw e; + } finally { + if (inChannel != null) + inChannel.close(); + if (outChannel != null) + outChannel.close(); + } + } + + public static void copyDirectory(File sourceLocation , File targetLocation) + throws IOException { + + if (sourceLocation.isDirectory()) { + if (!targetLocation.exists()) { + targetLocation.mkdir(); + } + + String[] children = sourceLocation.list(); + for (int i = 0; i < children.length; i++) { + copyDirectory(new File(sourceLocation, children[i]), + new File(targetLocation, children[i])); + } + } else { + copyFile(sourceLocation, targetLocation); + } + } + + public static void deleteDirectoryContent(File dir) { + File[] files = dir.listFiles(); + if(files != null) { //some JVMs return null for empty dirs + for(File f: files) { + if(f.isDirectory()) { + deleteDirectoryContent(f); + } + f.delete(); + } + } + } + + // ----------------------------------------------------------------------------------------------- + + public static int countT3Modules(File f) { + if (f.toString().endsWith(".xsd")) + return 1; + int moduleCount = 0; + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*module\\s+\\w+\\s*.*")) { + moduleCount++; + } + } + in.close(); + fs.close(); + } catch (IOException e) { + e.printStackTrace(); + } + return moduleCount; + } + + // ----------------------------------------------------------------------------------------------- + + private static Pattern s_verdictPassMatch = Pattern.compile("^^\\s*\\*\\*\\s*@verdict\\s*pass\\s*(.*)"); + private static Pattern s_verdictMatch = Pattern.compile("^\\s*\\*\\*\\s*@verdict\\s*.*"); + private static Pattern s_configMatch = Pattern.compile("^\\s*\\*\\*\\s*@configuration\\s*(.*)"); + public static T3ExpectedOutput extractExpectedOutput(File f) { + T3ExpectedOutput t3ExpectedOutput = new T3ExpectedOutput(); + + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + Matcher configMatch; + while ((strLine = br.readLine()) != null) { + if (s_verdictMatch.matcher(strLine).matches()) { + Matcher matcher = s_verdictPassMatch.matcher(strLine); + if (matcher.find()) { + String result = matcher.group(1); + String[] split = result.split(","); + t3ExpectedOutput.setExpectedOutput(split[0].trim()); + if (split.length > 1) + t3ExpectedOutput.setExecutionResult(split[1].trim()); + } + +// System.out.println(strLine); + } else if ((configMatch = s_configMatch.matcher(strLine)).matches()) { + t3ExpectedOutput.setConfiguration(configMatch.group(1)); + } + } + in.close(); + fs.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + return t3ExpectedOutput; + } + + // ----------------------------------------------------------------------------------------------- + + public static ArrayList splitT3ModuleFiles(File f) { + ArrayList files = new ArrayList(); + StringBuffer current = new StringBuffer(); + File newFile = new File(f.getParent() + "//temp.ttcn"); + if (f.exists()) { + f.renameTo(newFile); + } + + try { + FileInputStream fs = new FileInputStream(newFile.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + int moduleCounter = 0; + String currentModuleName = ""; + + while ((strLine = br.readLine()) != null) { + if (strLine.matches("^\\s*module\\s+\\w+\\s*.*")) { + moduleCounter++; + if (moduleCounter > 1) { // write file + String targetFilename = f.getParent() + "//" + currentModuleName + ".ttcn"; + FileWriter fw = new FileWriter(targetFilename); + fw.write(current.toString()); + fw.close(); + current = new StringBuffer(); + files.add(new File(targetFilename)); + } + Matcher matcher = Pattern.compile("^\\s*module\\s+(\\w+)\\s*.*").matcher(strLine); + if (matcher.find()) { + currentModuleName = matcher.group(1); + } + } + current.append(strLine + "\n"); + } + // write file + String targetFilename = f.getParent() + "//" + currentModuleName + ".ttcn"; + FileWriter fw = new FileWriter(targetFilename); + fw.write(current.toString()); + fw.close(); + in.close(); + fs.close(); + files.add(new File(targetFilename)); + newFile.delete(); + } catch (IOException e) { + e.printStackTrace(); + } + + return files; + } + + public static ArrayList readExclusionList(File f) { + ArrayList files = new ArrayList(); + + try { + FileInputStream fs = new FileInputStream(f.getAbsolutePath()); + DataInputStream in = new DataInputStream(fs); + BufferedReader br = new BufferedReader(new InputStreamReader(in)); + + String strLine = ""; + while ((strLine = br.readLine()) != null) { + if (strLine.trim().length() > 0) + files.add(strLine); + } + return files; + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } + +} diff --git a/tools/TestCastSupport/TestCastTester/src/Logger.java b/tools/TestCastSupport/TestCastTester/src/Logger.java new file mode 100644 index 0000000000000000000000000000000000000000..f457d0f71bc4fd781ef4f9849e9c3847d44a999c --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/Logger.java @@ -0,0 +1,88 @@ +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +public class Logger { + private File allLogFile; + private File criticalLogFile; + private BufferedWriter allOut; + private BufferedWriter criticalOut; + + public Logger(File allLogFile, File criticalLogFile) { + this.allLogFile = allLogFile; + this.criticalLogFile = criticalLogFile; + } + + public void init() { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath()); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath()); + criticalOut = new BufferedWriter(criticalFStream); + allOut.write(""); + criticalOut.write(""); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void writeScreen(String str) { + System.out.println(str); + } + + public void writeAll(String str) { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath(),true); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath(), true); + criticalOut = new BufferedWriter(criticalFStream); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.write(str); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void writeCritical(String str) { + try { + FileWriter allFStream = new FileWriter(allLogFile.getAbsolutePath(),true); + allOut = new BufferedWriter(allFStream); + FileWriter criticalFStream = new FileWriter(criticalLogFile.getAbsolutePath(), true); + criticalOut = new BufferedWriter(criticalFStream); + } catch (IOException e) { + e.printStackTrace(); + } + try { + criticalOut.write(str); + } catch (IOException e) { + e.printStackTrace(); + } + try { + allOut.close(); + criticalOut.close(); + } catch (IOException e) { + } + } + + public void finish() { +// try { +// allOut.close(); +// criticalOut.close(); +// } catch (IOException e) { +// } + } +} diff --git a/tools/TestCastSupport/TestCastTester/src/T3ExpectedOutput.java b/tools/TestCastSupport/TestCastTester/src/T3ExpectedOutput.java new file mode 100644 index 0000000000000000000000000000000000000000..e21928c84e430548b1b7edae111b022f4093b61b --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/T3ExpectedOutput.java @@ -0,0 +1,39 @@ +public class T3ExpectedOutput { + private String expectedOutput; + private String executionResult; + private String m_configuration; + + public String getExpectedOutput() { + return expectedOutput; + } + + public void setExpectedOutput(String expectedOutput) { + this.expectedOutput = expectedOutput; + } + + public String getExecutionResult() { + return executionResult; + } + + public void setExecutionResult(String executionResult) { + this.executionResult = executionResult; + } + + @Override + public String toString() { + return "T3ExpectedOutput [expectedOutput=" + expectedOutput + + ", executionResult=" + executionResult + "]"; + } + + public void setConfiguration(String config) { + m_configuration = config; + } + + public String getConfiguration() { + return m_configuration; + } + + public boolean isConfiguration(String config) { + return m_configuration != null && m_configuration.equals(config); + } +} diff --git a/tools/TestCastSupport/TestCastTester/src/T3ScriptFile.java b/tools/TestCastSupport/TestCastTester/src/T3ScriptFile.java new file mode 100644 index 0000000000000000000000000000000000000000..bf9ad184518c37a94746bab70883e4e627e21471 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/T3ScriptFile.java @@ -0,0 +1,18 @@ +import java.io.File; +import java.util.ArrayList; + + +public class T3ScriptFile { + private File t3File, xmlFile; + private ArrayList xsdFiles, m_direcories; + public T3ScriptFile (File t3File, ArrayList xsdFiles, File xmlFile, ArrayList directories) { + this.t3File = t3File; + this.xsdFiles = xsdFiles; + this.xmlFile = xmlFile; + m_direcories = directories; + } + public File getT3File() { return t3File; } + public File getXmlFile() { return xmlFile; } + public ArrayList getXsdFiles() { return xsdFiles; } + public ArrayList getDirectories() { return m_direcories;} +} diff --git a/tools/TestCastSupport/TestCastTester/src/TestCastProjectBuilder.java b/tools/TestCastSupport/TestCastTester/src/TestCastProjectBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..21f1bc8bfadea6d4034808a9c84c24624535f3bc --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/TestCastProjectBuilder.java @@ -0,0 +1,131 @@ +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; + + +public class TestCastProjectBuilder { + private String files = ""; + private String sut = ""; + private boolean m_bElemSubst, m_bTypeSubst, m_bXsdAnytype; + + private String template1 = "\n" + + "\n" + + " \n" + + " \n"; + + private String template2 = + " \n" + + " \n" + + " \n"; + + private String template3 = + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " Ttcn3_2017\n" + + " BER\n" + + " 10\n" + + " 7777\n" + + " 60\n" + + " 1\n" + + " 20\n" + + " internal\n" + + " \n" + + " \n" + + " dec\n" + + " UTF8\n" + + " le\n" + + " :\n" + + " \\t\n" + + " ;\n" + + " \n" + + " \n"; + + private String template4 = + " \n" + + " definite\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 0.1\n" + + " \n" + + " 10\n"; + + private String template5 = " \n" + + ""; + + public void addFile(String filename) { + File f = new File(filename); + files += " \n"; + } + + public void setSUT(String sutFile) { + sut = " \n"; + sut += " \"" + sutFile + "\"\n"; + sut += " \n"; + } + + public String getProjectFileString() { + StringBuilder sb = new StringBuilder(); + sb.append(template1); + sb.append(files); + sb.append(template2); + sb.append(sut); + sb.append(template3); + if (m_bElemSubst) + sb.append(" "); + if (m_bTypeSubst) + sb.append(" "); + sb.append(template4); + if (m_bXsdAnytype) + sb.append(" anytype"); + sb.append(template5); + return sb.toString(); + } + + public void saveProjectFile(File f) { + PrintWriter out; + try { + out = new PrintWriter(new FileWriter(f)); + out.print(getProjectFileString()); + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void setElementSubstitutions(boolean bEnabled) { + m_bElemSubst = bEnabled; + } + + public void setTypeSubstitutions(boolean bEnabled) { + m_bTypeSubst = bEnabled; + } + + public void setXsdAnyToTtcn3Anytype(boolean bEnabled) { + m_bXsdAnytype = bEnabled; + } +} diff --git a/tools/TestCastSupport/TestCastTester/src/TestCastRunner.java b/tools/TestCastSupport/TestCastTester/src/TestCastRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..69f2d02c22fce9934c8a05ef537c62fb8f97d13c --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/TestCastRunner.java @@ -0,0 +1,211 @@ +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; + +public class TestCastRunner { + private File projectFile; + private String scriptName; + private Logger logger; + private StringBuffer cmdLineOutputErrors = new StringBuffer(); + private StringBuffer cmdLineOutputAll = new StringBuffer(); + + private boolean accepted = true; + private int testNumber; + + public enum verdictEnum { + pass, inconc, fail, error, none + } + + private verdictEnum testVerdict = verdictEnum.pass; + + public TestCastRunner(File projectFile, String scriptName, Logger logger, int testNumber) { + this.projectFile = projectFile; + this.scriptName = scriptName; + this.logger = logger; + this.testNumber = testNumber; + } + + public void run() { + List args = new ArrayList(); + File tempDir = new File(TestCastTester.config.get("TempPath") + .toString()); + System.setProperty("user.dir", tempDir.getAbsolutePath()); + File tool = new File(TestCastTester.config.get( + "TestCastCommandLineTool").toString()); + args.add(tool.getAbsolutePath()); + args.add("-proj"); + args.add(projectFile.getAbsolutePath()); + args.add("-s"); + args.add(scriptName); + args.add("-r"); + args.add("-rb"); + ProcessBuilder processBuilder = new ProcessBuilder(args); + processBuilder.redirectErrorStream(true); + try { + Process process = processBuilder.start(); + InputStream is = process.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String line; + + while ((line = br.readLine()) != null) { + //System.out.println(line); + cmdLineOutputAll.append(" --->" + line); + cmdLineOutputAll.append("\n"); + + if (line.matches("^\\[ERR\\].*")) { + cmdLineOutputErrors.append(" --->" + line + "\n"); + accepted = false; + } else if (line.contains("Compilation failed")) { + accepted = false; + } else if (line.contains("The test case") && line.contains("has ended with the result")) { + if (line.contains("")) { + updateVerdict(verdictEnum.pass); + } else if (line.contains("")) { + updateVerdict(verdictEnum.inconc); + } else if (line.contains("")) { + updateVerdict(verdictEnum.fail); + } else if (line.contains("")) { + updateVerdict(verdictEnum.error); + } else if (line.contains("")) { + updateVerdict(verdictEnum.none); + } + } + // System.out.println(line); + } + + } catch (IOException e) { + e.printStackTrace(); + } + } + + public boolean isAccepted() { + return accepted; + } + + public void updateVerdict(verdictEnum newVerdict) { + if (testVerdict == verdictEnum.none) { + testVerdict = newVerdict; + } else if (testVerdict == verdictEnum.pass) { + if ((newVerdict != verdictEnum.pass) && (newVerdict != verdictEnum.none)) + testVerdict = newVerdict; + } else if (testVerdict == verdictEnum.inconc) { + if ((newVerdict == verdictEnum.fail) || (newVerdict == verdictEnum.error)) + testVerdict = newVerdict; + } else if (testVerdict == verdictEnum.fail) { + if (newVerdict == verdictEnum.error) + testVerdict = newVerdict; + } + } + + public boolean evaluateResults(T3ExpectedOutput expectedOutput) { + boolean bResult = false; + if (!accepted) { // testcast rejects the input + if (expectedOutput.getExpectedOutput().contains("reject")) { + logger.writeScreen(testNumber + ": [pass] " + scriptName); + logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); + bResult = true; + } else if (expectedOutput.getExpectedOutput().contains("accept")) { + try { + verdictEnum expectedVerdict = executionResultToVerdictEnum(expectedOutput.getExecutionResult()); + if (expectedVerdict == verdictEnum.error) { // sometimes the error is detectable in compile-time + logger.writeScreen(testNumber + ": [pass] " + scriptName); + logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); + bResult = true; + } else { + logger.writeScreen(testNumber + ": [fail] " + scriptName + " - tool does not accept input, but acceptance is expected!"); + logger.writeAll(testNumber + ": [fail] " + scriptName + " - tool does not accept input, but acceptance is expected!\n"); + logger.writeCritical(testNumber + ": [fail] " + scriptName + " - tool does not accept input, but acceptance is expected!\n"); +// logger.writeAll(cmdLineOutputErrors.toString()); +// logger.writeCritical(cmdLineOutputErrors.toString()); + logger.writeAll(cmdLineOutputAll.toString()); + logger.writeCritical(cmdLineOutputAll.toString()); + } + } catch (Exception e) { + logger.writeScreen(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!"); + logger.writeAll(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!\n"); + logger.writeCritical(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!\n"); + logger.writeAll(cmdLineOutputAll.toString()); + logger.writeCritical(cmdLineOutputAll.toString()); + } + } else { + logger.writeScreen(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!"); + logger.writeAll(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!\n"); + logger.writeCritical(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!\n"); + } + } else { // testcast accepts the input + if (expectedOutput.getExpectedOutput().contains("accept")) { +// logger.writeScreen(testNumber + ": [pass] " + scriptName); +// logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); +// System.out.println("==================> have to check execution result!!"); +// System.out.println(cmdLineOutputAll.toString()); + + if ((expectedOutput.getExecutionResult() == null) || (expectedOutput.getExecutionResult().contains("noexecution")) ){ // no execution result required... + logger.writeScreen(testNumber + ": [pass] " + scriptName); + logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); + bResult = true; + } else { // we must compare the execution result + try { + verdictEnum expectedVerdict; + expectedVerdict = executionResultToVerdictEnum(expectedOutput.getExecutionResult()); + if (expectedVerdict == testVerdict) { + logger.writeScreen(testNumber + ": [pass] " + scriptName); + logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); + bResult = true; + } else { + logger.writeScreen(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but expected execution results mismatch! Expected: " + expectedVerdict + ", Actual: " + testVerdict); + logger.writeAll(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but expected execution results mismatch! Expected: " + expectedVerdict + ", Actual: " + testVerdict + "\n"); + logger.writeCritical(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but expected execution results mismatch! Expected: " + expectedVerdict + ", Actual: " + testVerdict + "\n"); + logger.writeAll(cmdLineOutputAll.toString()); + logger.writeCritical(cmdLineOutputAll.toString()); + } + } catch (Exception e) { + logger.writeScreen(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!"); + logger.writeAll(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!\n"); + logger.writeCritical(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but an error occured during the verdict conversion. Possible typo in test case!\n"); + logger.writeAll(cmdLineOutputAll.toString()); + logger.writeCritical(cmdLineOutputAll.toString()); + } + } + } else if (expectedOutput.getExpectedOutput().contains("reject")) { + if (testVerdict == verdictEnum.error) { // error verdict without an explicit exception is acceptable rejection + logger.writeScreen(testNumber + ": [pass] " + scriptName); + logger.writeAll(testNumber + ": [pass] " + scriptName + "\n"); + bResult = true; + } else { + logger.writeScreen(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but rejection is expected!"); + logger.writeAll(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but rejection is expected!\n"); + logger.writeCritical(testNumber + ": [fail] " + scriptName + " - tool accepts the input, but rejection is expected!\n"); + logger.writeAll(cmdLineOutputAll.toString()); + logger.writeCritical(cmdLineOutputAll.toString()); + } + } else { + logger.writeScreen(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!"); + logger.writeAll(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!\n"); + logger.writeCritical(testNumber + ": [inconc] " + scriptName + " - cannot interpret expected output!\n"); + } + } + return bResult; + } + + private verdictEnum executionResultToVerdictEnum(String str) throws Exception { + if (str.contains("ttcn3verdict:pass")) { + return verdictEnum.pass; + } else if (str.contains("ttcn3verdict:inconc")) { + return verdictEnum.inconc; + } else if (str.contains("ttcn3verdict:fail")) { + return verdictEnum.fail; + } else if (str.contains("ttcn3verdict:error")) { + return verdictEnum.error; + } else if (str.contains("ttcn3verdict:none")) { + return verdictEnum.none; + } + + throw new Exception("Unknown execution result"); + } + +} diff --git a/tools/TestCastSupport/TestCastTester/src/TestCastTester.java b/tools/TestCastSupport/TestCastTester/src/TestCastTester.java new file mode 100644 index 0000000000000000000000000000000000000000..c19cc9c5b671154b66cf9bc01b82493eb0f34479 --- /dev/null +++ b/tools/TestCastSupport/TestCastTester/src/TestCastTester.java @@ -0,0 +1,175 @@ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Properties; + +public class TestCastTester { + + public static Properties config = new Properties(); + private ArrayList files = new ArrayList(); + private int startIteration = 0; + private ArrayList exclusionList; + + // ----------------------------------------------------------------------------------------------- + + public TestCastTester() { + } + + // ----------------------------------------------------------------------------------------------- + + public void run() { + System.out.println("STF 521 TestCast Tester v1.0"); + try { + FileUtils.loadConfig(config); + } catch (IOException e) { + System.err + .println("[ERROR] Cannot load config file or config file is incomplete."); + return; + } + + String atsPath = config.get("ATSPath").toString(); + System.out.println("Gathering files..."); + FileUtils.visitAllFiles(new File(atsPath), files); + + System.out.println("Reading exclusion list..."); + exclusionList = FileUtils.readExclusionList(new File("resources/skipList.txt")); + + File allLogFile = new File(config.get("LogPath") + "/all.log"); + File criticalLogFile = new File(config.get("LogPath") + "/critical.log"); + Logger logger = new Logger(allLogFile, criticalLogFile); + logger.init(); + + int nPassed = 0, nExecuted = 0; + for (int i=0; i < files.size(); i++) { + if (startIteration > i) + continue; + File srcFile = files.get(i).getT3File(); + String t3FileName = srcFile.getName(); + File tempFile = new File(config.get("TempPath") + "/" + t3FileName); + + if (inExclusionList(t3FileName)) { + System.out.println("**exclusion list match. skipping " + t3FileName); + continue; + } + + try { + FileUtils.copyFile(new File(srcFile.getAbsolutePath()), tempFile); + } catch (IOException e) { + System.err.println("[ERROR] Could not copy file " + srcFile.getAbsolutePath() + "! Stopping tester..."); + return; + } + + int moduleCount = FileUtils.countT3Modules(tempFile); + + ArrayList filesToProcess = new ArrayList(); + if (moduleCount > 1) { + filesToProcess.addAll(FileUtils.splitT3ModuleFiles(tempFile)); + } else { + filesToProcess.add(tempFile); + } + + if (filesToProcess.size() <= 0) + continue; + + ArrayList xsdFiles = files.get(i).getXsdFiles(); + if (xsdFiles != null) { + for(File xsdFile : xsdFiles) { + File tempXsdFile = new File(config.get("TempPath") + "/" + xsdFile.getName()); + try { + FileUtils.copyFile(new File(xsdFile.getAbsolutePath()), tempXsdFile); + } catch (IOException e) { + System.err.println("[ERROR] Could not copy file " + xsdFile.getAbsolutePath() + "! Stopping tester..."); + return; + } + filesToProcess.add(tempXsdFile); + } + } + + ArrayList directories = files.get(i).getDirectories(); + if (directories != null) { + for(File dir : directories) { + File tempDir = new File(config.get("TempPath") + "/" + dir.getName()); + try { + FileUtils.copyDirectory(new File(dir.getAbsolutePath()), tempDir); + } catch (IOException e) { + System.err.println("[ERROR] Could not copy directory " + dir.getAbsolutePath() + "! Stopping tester..."); + return; + } + } + } + + srcFile = files.get(i).getXmlFile(); + if (srcFile != null) { + String xmlFileName = srcFile.getName(); + tempFile = new File(config.get("TempPath") + "/" + xmlFileName); + + try { + FileUtils.copyFile(new File(srcFile.getAbsolutePath()), tempFile); + } catch (IOException e) { + System.err.println("[ERROR] Could not copy file " + srcFile.getAbsolutePath() + "! Stopping tester..."); + return; + } + } + + T3ExpectedOutput expectedOutput = FileUtils.extractExpectedOutput(filesToProcess.get(0)); + + TestCastProjectBuilder builder = new TestCastProjectBuilder(); + for (int j=0; j < filesToProcess.size(); j++) { + builder.addFile(filesToProcess.get(j).getAbsolutePath()); + } + builder.setSUT(new File(config.get("LoopbackAdapterPath").toString()).getAbsolutePath()); + builder.setElementSubstitutions(expectedOutput.isConfiguration("elem_subst")); + builder.setTypeSubstitutions(expectedOutput.isConfiguration("type_subst")); + builder.setXsdAnyToTtcn3Anytype(expectedOutput.isConfiguration("any_to_anytype")); + File projectFile = new File(config.get("TempPath") + "/testcast.tcproj"); + builder.saveProjectFile(projectFile); + + TestCastRunner runner = new TestCastRunner(projectFile, filesToProcess.get(0).getName().substring(0, filesToProcess.get(0).getName().indexOf(".ttcn")), logger, i+1); + runner.run(); + nExecuted++; + if (runner.evaluateResults(expectedOutput)) + nPassed++; + + // cleanup + tempFile = new File((String) config.get("TempPath")); + FileUtils.deleteDirectoryContent(tempFile); + /*if (tempFile.exists()) { + boolean success = tempFile.delete(); + if (!success) + System.err.println("[ERROR] Could not delete file " + tempFile.getAbsolutePath()); + } + for (int j=0; j < filesToProcess.size(); j++) { + if (filesToProcess.get(j).exists()) { + boolean success = filesToProcess.get(j).delete(); + if (!success) + System.err.println("[ERROR] Could not delete file " + tempFile.getAbsolutePath()); + } + } + if (projectFile.exists()) { + boolean success = projectFile.delete(); + if (!success) + System.err.println("[ERROR] Could not delete file " + tempFile.getAbsolutePath()); + }*/ + } + System.out.println("Executed tests: " + nExecuted + "; failed tests: " + (nExecuted - nPassed)); + System.out.println("Done."); + logger.finish(); + } + + // ----------------------------------------------------------------------------------------------- + + private boolean inExclusionList(String filename) { + for (int i=0; i < exclusionList.size(); i++) { + if (filename.contains(exclusionList.get(i))) + return true; + } + return false; + } + + // ----------------------------------------------------------------------------------------------- + + public static void main(String[] args) { + new TestCastTester().run(); + } + +} diff --git a/tools/TestMacroProcessor/.classpath b/tools/TestMacroProcessor/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..18d70f02cb8eeded3bb20b75f0cd29bb66157990 --- /dev/null +++ b/tools/TestMacroProcessor/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/tools/TestMacroProcessor/.project b/tools/TestMacroProcessor/.project new file mode 100644 index 0000000000000000000000000000000000000000..d332f2c941fa9aca8407a19a6cbb425d83202215 --- /dev/null +++ b/tools/TestMacroProcessor/.project @@ -0,0 +1,33 @@ + + + TestMacroProcessor + + + + + + com.testingtech.ttworkbench.ttthree.modelBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.testingtech.ttworkbench.ttthree.todoBuilder + + + + + com.testingtech.ttworkbench.ttthree.tt3pluginbuilder + + + + + + com.testingtech.ttworkbench.core.ttcn3nature + org.eclipse.jdt.core.javanature + + diff --git a/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.core.prefs b/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..396391b7c9ea07c2409cbee6241ac4a38d48d834 --- /dev/null +++ b/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +ttcn3.source_folders=//PROJECT_NAME//macros diff --git a/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs b/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..f237628e03ef0418cf5eaf214329edd52462856e --- /dev/null +++ b/tools/TestMacroProcessor/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs @@ -0,0 +1,24 @@ +eclipse.preferences.version=1 +gen-xsd-codec=true +xsd-convert-sets-into-records=true +xsd-convert-unions-into-records-of-optionals=false +xsd-generate-all-fields-optional=false +xsd-generate-enumerations=true +xsd-implicitly-import-xsdaux=true +xsd-interleave-text-and-elements=false +xsd-mangle-attribute-names=false +xsd-mangle-element-names=false +xsd-mangle-names-standard-conform=true +xsd-map-any-to-anytype=false +xsd-map-optional-union-fields-to-record-of=true +xsd-map-substitution-groups-with-unions=false +xsd-map-subtyping-with-unions=false +xsd-merge-attributes-into-parent=true +xsd-merge-elements-into-parent=true +xsd-merge-namespaces-into-one-module=false +xsd-output-path=tt3plugins +xsd-package-name= +xsd-profile=standard +xsd-replace-bad-chars-with-underscore=true +xsd-strip-namespaces=false +xsd-use-anyattribute-aux-type=false diff --git a/tools/TestMacroProcessor/.settings/org.eclipse.jdt.core.prefs b/tools/TestMacroProcessor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..8000cd6ca6142c8827db81f47ca38a3d5d7e2eaf --- /dev/null +++ b/tools/TestMacroProcessor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/tools/TestMacroProcessor/MessageGenerator.launch b/tools/TestMacroProcessor/MessageGenerator.launch new file mode 100644 index 0000000000000000000000000000000000000000..7313ef726811d1751d175593abcb754562ca64e4 --- /dev/null +++ b/tools/TestMacroProcessor/MessageGenerator.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tools/TestMacroProcessor/README.txt b/tools/TestMacroProcessor/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..e8396e6e3576130b07e9a7709843606a5ec73416 --- /dev/null +++ b/tools/TestMacroProcessor/README.txt @@ -0,0 +1,10 @@ +Generate the ATS from preATS if both projects are in the workspace + +please check the configuration in config.properties to specify input, output and macro folder + +Right click on the TestMacroProcessor.launch and run as Java Application + - generate tests in the target folder as defined by the respective *.ttcn_macro file from the macros folder + +Right click on the MessageGenerator.launch and run as Java Application + - uses TC_gen_XML.ttcn_macro macro + - generates tests that for each template a .ttcn.xml_ file containing the encoded template is generated \ No newline at end of file diff --git a/tools/TestMacroProcessor/TestMacroProcessor.launch b/tools/TestMacroProcessor/TestMacroProcessor.launch new file mode 100644 index 0000000000000000000000000000000000000000..b42f867d8c9b4d4dacb151b68c7cb7ec700b1fbf --- /dev/null +++ b/tools/TestMacroProcessor/TestMacroProcessor.launch @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tools/TestMacroProcessor/config.properties b/tools/TestMacroProcessor/config.properties new file mode 100644 index 0000000000000000000000000000000000000000..d36ee50813fd777c18e7843f6c56fdcfb8d93ba0 --- /dev/null +++ b/tools/TestMacroProcessor/config.properties @@ -0,0 +1,3 @@ +input.ats.path=../preATS +output.ats.path=../ATS +macro.path=macros \ No newline at end of file diff --git a/tools/TestMacroProcessor/macros/TC.ttcn_macro b/tools/TestMacroProcessor/macros/TC.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..709639eb3d19c9e50a565afdf2b0038e20498dfc --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC.ttcn_macro @@ -0,0 +1,65 @@ + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_${module}() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "${module}.xml", ${xsdFileList}, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_Decode.ttcn_macro b/tools/TestMacroProcessor/macros/TC_Decode.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..4128f50c96b5c0140e010adf67cdaf9d2f323a22 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_Decode.ttcn_macro @@ -0,0 +1,55 @@ + + /** + * @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; + } + + /** + * @desc Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + + testcase TC_${module}() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + v_rcv := readFile("${module}.xml"); + + // send the encoded the message + p.send(v_rcv); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // decode the message + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_DifferentReceiveMatch.ttcn_macro b/tools/TestMacroProcessor/macros/TC_DifferentReceiveMatch.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..707772fda9054ece8ddb0a20c3ea3ac96566f25f --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_DifferentReceiveMatch.ttcn_macro @@ -0,0 +1,65 @@ + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_${module}() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "${module}.xml", ${xsdFileList}, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_Neg.ttcn_macro b/tools/TestMacroProcessor/macros/TC_Neg.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..5d13e6be305a7a0323ef7269af49a73b5d422d72 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_Neg.ttcn_macro @@ -0,0 +1,31 @@ + + /** + * @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_${module}() 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_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_Neg_type.ttcn_macro b/tools/TestMacroProcessor/macros/TC_Neg_type.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..36a2490a5187a2a2292029e3e3fbba77cfbd2d08 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_Neg_type.ttcn_macro @@ -0,0 +1,18 @@ + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_${module}() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_NoXMLDecode.ttcn_macro b/tools/TestMacroProcessor/macros/TC_NoXMLDecode.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..14c84e8bad2fc3313a86d412dd7d025abc1348a4 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_NoXMLDecode.ttcn_macro @@ -0,0 +1,58 @@ + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_${module}() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.receive(Raw:?) -> value v_rcv { + log("XML message ", v_rcv); + // TODO: in order to enable the check, a validation tool update needed so that it can work without schemas + //if (matchFile(v_rcv, "${module}.xml", {}, v_matchError)) { + setverdict(pass, "Decoded value matches reference XML"); + //} else { + // setverdict(fail, v_matchError); + //} + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_NoXMLMatch.ttcn_macro b/tools/TestMacroProcessor/macros/TC_NoXMLMatch.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..c93af346568e1de862ece5d262a57b68a9fc3f40 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_NoXMLMatch.ttcn_macro @@ -0,0 +1,45 @@ + + /** + * @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_${module}() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_gen_XML.ttcn_macro b/tools/TestMacroProcessor/macros/TC_gen_XML.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..01152896badfba2178408a2c41c10415ec78e6f3 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_gen_XML.ttcn_macro @@ -0,0 +1,22 @@ + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + import from TTlibrary all; + + type component C {} + + testcase TC_${module}() runs on C system C { + var bitstring res := encvalue(m_msg); + var charstring fileContent := oct2char(bit2oct(res)); + var charstring xmlfilename := __FILE__ & ".xml_"; +// if (not(fileExists(xmlfilename))) { + writeFileFromUTF8Charstring(xmlfilename, fileContent); +// } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/macros/TC_type.ttcn_macro b/tools/TestMacroProcessor/macros/TC_type.ttcn_macro new file mode 100644 index 0000000000000000000000000000000000000000..9105b961063b47c3287a4c7d0660731434061451 --- /dev/null +++ b/tools/TestMacroProcessor/macros/TC_type.ttcn_macro @@ -0,0 +1,22 @@ + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_${module}() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_${module}(), PX_TC_EXECUTION_TIMEOUT); + } diff --git a/tools/TestMacroProcessor/output/empty b/tools/TestMacroProcessor/output/empty new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tools/TestMacroProcessor/src/MessageGenerator.java b/tools/TestMacroProcessor/src/MessageGenerator.java new file mode 100644 index 0000000000000000000000000000000000000000..e8a89ff24be1d45d3624f861a9a7c4878d3e5e2e --- /dev/null +++ b/tools/TestMacroProcessor/src/MessageGenerator.java @@ -0,0 +1,14 @@ +import java.io.IOException; + +public class MessageGenerator { + private static final String XML_GEN = "TC_gen_XML"; + + /** + * Generate an XML write test and also a main module for importing them + * @param args ignored + */ + public static void main(String[] args) throws IOException { + TestMacroProcessor.run(XML_GEN); + } + +} diff --git a/tools/TestMacroProcessor/src/TestMacroProcessor.java b/tools/TestMacroProcessor/src/TestMacroProcessor.java new file mode 100644 index 0000000000000000000000000000000000000000..3cd0869c9e165eaa923041525c10231bd3d77427 --- /dev/null +++ b/tools/TestMacroProcessor/src/TestMacroProcessor.java @@ -0,0 +1,251 @@ +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.nio.channels.FileChannel; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Properties; + +public class TestMacroProcessor { + private static final String CRNL = "\r\n"; + + private static final String MACRO_PREFIX = "//#"; + + private File macroFolder = new File("macros"); + + private String forceMacroGeneration = null; + + private ArrayList processedModules = new ArrayList(); + + public static void main(String[] args) throws IOException { + run(null); + } + + /** + * Generate for all .ttcn_ files from the input.ats.path .ttcn files into the output.ats.path + * @param forceMacroGeneration if not null, will generate always the given macro instead of real one + */ + static void run(String forceMacroGeneration) throws FileNotFoundException, IOException { + File configFile = new File("config.properties"); + if (!configFile.exists()) { + throw new FileNotFoundException("No config.properties file found in current path"); + } + + Properties config = new Properties(); + config.load(new FileInputStream(configFile)); + + TestMacroProcessor testMacroProcessor = new TestMacroProcessor(); + testMacroProcessor.macroFolder = new File(config.getProperty("macro.path")); + testMacroProcessor.forceMacroGeneration = forceMacroGeneration; + testMacroProcessor.run(new File(config.getProperty("input.ats.path")), new File(config.getProperty("output.ats.path"))); + } + + public void run(File inputPath, File outputPath) throws IOException { + ArrayList files = new ArrayList(); + visitAllFiles(inputPath, files, ".ttcn_"); + visitAllFiles(inputPath, files, ".xsd"); + visitAllFiles(inputPath, files, ".xml"); + Collections.sort(files); + + for (File inputFile : files) { + runForFile(inputFile, inputPath, outputPath); + } + System.out.println("Processed "+files.size()+" file(s) and stored to folder\n"+outputPath); + + + // generate main module for force macro generation +// if (forceMacroGeneration != null) { + String importModule = "ImportAllGeneratedModules"; + File importAllModule = new File(outputPath, importModule+".ttcn3"); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(importAllModule), "UTF-8")); + bw.write("module "+importModule+" {"); + bw.write(CRNL); + for (String moduleName : processedModules) { + bw.write(" import from "+moduleName+" all;"); + bw.write(CRNL); + } + bw.write("}"); + bw.close(); +// } + } + + public void runForFile(File inputFile, File inputPath, File outputPath) throws IOException { + try { + File targetFile = computeTargetFileName(inputFile, inputPath, outputPath); + targetFile.getParentFile().mkdirs(); + if (inputFile.getName().endsWith(".ttcn_")) { + replaceInFile(inputFile, targetFile); + } else { + copyFile(inputFile, targetFile); + } + } finally { + System.out.println("Processed file: "+inputFile); + } + } + + @SuppressWarnings("resource") + public static void copyFile(File in, File out) throws IOException { + FileChannel inChannel = new FileInputStream(in).getChannel(); + FileChannel outChannel = new FileOutputStream(out).getChannel(); + try { + inChannel.transferTo(0, inChannel.size(), outChannel); + } catch (IOException e) { + throw e; + } finally { + if (inChannel != null) { + try { + inChannel.close(); + } catch (IOException e) { + // ignore close error + } + } + if (outChannel != null) { + // throws error further since target file + outChannel.close(); + } + } + } + + /** + * Expecting //# TC or //# TC2(param1, param2) + */ + private void replaceInFile(File inputFile, File outputFile) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(inputFile), "UTF-8")); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8")); + try { + String line; + while ((line = br.readLine()) != null) { + if (line.trim().startsWith(MACRO_PREFIX)) { + int indexOfMacroPrefix = line.indexOf(MACRO_PREFIX); + int beginIndex = indexOfMacroPrefix+MACRO_PREFIX.length(); + int endIndex = line.indexOf('(', beginIndex); + if (endIndex <= beginIndex) { + endIndex = line.length(); + } + String macro = line.substring(beginIndex, endIndex).trim(); + bw.write(CRNL); + String moduleName = inputFile.getName(); + moduleName = moduleName.substring(0, moduleName.lastIndexOf('.')); + if (forceMacroGeneration != null) { + macro = forceMacroGeneration; + } + processedModules.add(moduleName); + writeMacro(macro, bw, moduleName, inputFile); + } else { + bw.write(line); + bw.write(CRNL); + } + } + } finally { + try { + br.close(); + } catch (IOException e) { + // ignore + } + try { + bw.close(); + } catch (IOException e) { + // ignore + } + + } + } + + private String readMacro(BufferedReader br) throws IOException { + StringBuilder sb = new StringBuilder(); + String line; + while ((line = br.readLine()) != null) { + sb.append(line).append(CRNL); + } + return sb.toString(); + } + + private void writeMacro(String macro, BufferedWriter bw, String moduleName, File inputFile) throws IOException { + File macroFile = new File(macroFolder, macro+".ttcn_macro"); + BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(macroFile), "UTF-8")); + String macroString = readMacro(br); + macroString = macroString.replace("${module}", moduleName); + StringBuilder xsdFileList = new StringBuilder(); + xsdFileList.append("{ "); + File[] listXSDFiles = null; + File parentFile = inputFile.getParentFile(); + File testData = new File(parentFile, "test_data"); + // First try to load XSD files from "test_data" folder + boolean fromTestData = true; + if (testData.exists() && testData.isDirectory()) { + listXSDFiles = listXSDFiles(testData); + } + if (listXSDFiles == null || listXSDFiles.length == 0) { + // No XSD files in "test_data" folder. Fall-back to the main folder + listXSDFiles = listXSDFiles(parentFile); + fromTestData = false; + } + + boolean firstFile = true; + for (File xsdFile : listXSDFiles) { + if (!firstFile) { + xsdFileList.append(", "); + } + firstFile = false; + xsdFileList.append("\""); + if (fromTestData) { + xsdFileList.append("test_data").append('/'); + } + xsdFileList.append(xsdFile.getName()); + xsdFileList.append("\""); + } + xsdFileList.append(" }"); + macroString = macroString.replace("${xsdFileList}", xsdFileList); + bw.write(macroString); + bw.write(CRNL); + try { + br.close(); + } catch (Exception e) { + // ignore + } + } + + private File[] listXSDFiles(File parentFolder) { + File[] listXSDFiles = parentFolder.listFiles(new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.toLowerCase().endsWith(".xsd"); + } + }); + return listXSDFiles; + } + + private File computeTargetFileName(File inputFile, File inputPath, File outputPath) throws IOException, IOException { + String canonicalInputFile = inputFile.getCanonicalPath(); + String canonicalInputPath = inputPath.getCanonicalPath(); + String relativeInputPath = canonicalInputFile.substring(canonicalInputPath.length()+1); + if (!new File(inputPath, relativeInputPath).equals(inputFile)) { + throw new IOException("parent inputPath not matching inputFile"); + } + // cut _ at end of file + if (relativeInputPath.endsWith(".ttcn_")) { + relativeInputPath = relativeInputPath.substring(0, relativeInputPath.length()-1); + } + return new File(outputPath, relativeInputPath); + } + + public static void visitAllFiles(File f, ArrayList files, String extension) { + if (f.isDirectory()) { + String[] children = f.list(); + for (int i = 0; i < children.length; i++) { + visitAllFiles(new File(f, children[i]), files, extension); + } + } else { + if (f.toString().endsWith(extension)) { + files.add(f); + } + } + } + +} diff --git a/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.ttcn_ b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.ttcn_ new file mode 100644 index 0000000000000000000000000000000000000000..24c69f7c99e24dbb65a95956baba6b318b86b883 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.ttcn_ @@ -0,0 +1,19 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD include element information items shall be ignored if the included schema element has the same target +// namespace as the including one (implying the absence of the target namespace). + +module Pos_050102_includes_001 { + + import from schema_Pos_050102_includes_001 language "XSD" all; + + template MyType m_msg := 1; + +//#TC + +} diff --git a/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xml b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..42f7278bdc8240fe066eb5829a95f87d34346174 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xsd b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..97c302167de98cbb94675d1a62a437db24401752 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8f3fadc4cad184fbf39332c2cd6a05b30b95c861 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.ttcn_ b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.ttcn_ new file mode 100644 index 0000000000000000000000000000000000000000..565927214bec190f29f519e8b0a0ca43676cf3b0 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.ttcn_ @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_001 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; +//#TC +} \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xml b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebcae85df175928cb9cf4605efe806fa302a03cd --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xml @@ -0,0 +1 @@ +2147483647 \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xsd b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ca1fae531818fb18065223851c37edda6db9f60a --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_060301_integer_001/Pos_060301_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_060301_integer_002/Pos_060301_integer_002.ttcn_ b/tools/TestMacroProcessor/test/Pos_060301_integer_002/Pos_060301_integer_002.ttcn_ new file mode 100644 index 0000000000000000000000000000000000000000..3bed3f674dba9eab8f38867db9239c2b8a83d7ed --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_060301_integer_002/Pos_060301_integer_002.ttcn_ @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_002 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; +//#TC +} \ No newline at end of file diff --git a/tools/TestMacroProcessor/test/Pos_060301_integer_003/Pos_060301_integer_003.ttcn_ b/tools/TestMacroProcessor/test/Pos_060301_integer_003/Pos_060301_integer_003.ttcn_ new file mode 100644 index 0000000000000000000000000000000000000000..fcfc1f9f871a7d58275ac1f5072eb749fe5443d4 --- /dev/null +++ b/tools/TestMacroProcessor/test/Pos_060301_integer_003/Pos_060301_integer_003.ttcn_ @@ -0,0 +1,13 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_003 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; +//#TC +} \ No newline at end of file diff --git a/tools/XmlDiff/.classpath b/tools/XmlDiff/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..2a0b071523d70e97234225c2d57a209fd89aa1ac --- /dev/null +++ b/tools/XmlDiff/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tools/XmlDiff/.project b/tools/XmlDiff/.project new file mode 100644 index 0000000000000000000000000000000000000000..e3dd7722d42c0bd00648a9690a343e41d4812599 --- /dev/null +++ b/tools/XmlDiff/.project @@ -0,0 +1,17 @@ + + + XmlDiff + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/tools/XmlDiff/.settings/org.eclipse.jdt.core.prefs b/tools/XmlDiff/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..416f4fb696076006767f4e4ec37e74612a7fbd34 --- /dev/null +++ b/tools/XmlDiff/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/tools/XmlDiff/MANIFEST b/tools/XmlDiff/MANIFEST new file mode 100644 index 0000000000000000000000000000000000000000..915d707a6fc7a8ab3ca1e999b409228e1773be00 --- /dev/null +++ b/tools/XmlDiff/MANIFEST @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Created-By: Nikolay Pakulin npak@ispras.ru (ETSI STF 475) +Name: org/etsi/mts/ttcn/part9/xmldiff/ +Specification-Title: Utility to compare XML files +Specification-Version: 0.2 +Specification-Vendor: STF 475 +Implementation-Title: org.etsi.mts.ttcn.part9.xmldiff +Implementation-Version: build02 +Implementation-Vendor: STF 475 diff --git a/tools/XmlDiff/lib/xmlunit-1.5.jar b/tools/XmlDiff/lib/xmlunit-1.5.jar new file mode 100644 index 0000000000000000000000000000000000000000..a195ffef4b9b22d10cdf27770496a901a1dfdc7f Binary files /dev/null and b/tools/XmlDiff/lib/xmlunit-1.5.jar differ diff --git a/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xml b/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xml new file mode 100644 index 0000000000000000000000000000000000000000..0476dc385f7b9f36a344f3224b548fb13962db72 --- /dev/null +++ b/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xml @@ -0,0 +1,2 @@ + +1.0 \ No newline at end of file diff --git a/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xsd b/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bea557b6e0b8cf1959e34143abec1ff73dab410f --- /dev/null +++ b/tools/XmlDiff/regression/001_float_chinese_typename/Pos_050202_name_conversion_rules_014.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/tools/XmlDiff/regression/001_float_chinese_typename/sample.xml b/tools/XmlDiff/regression/001_float_chinese_typename/sample.xml new file mode 100644 index 0000000000000000000000000000000000000000..2727f12bd94edca92c843a7ecca8e5e51d1edbd3 --- /dev/null +++ b/tools/XmlDiff/regression/001_float_chinese_typename/sample.xml @@ -0,0 +1,2 @@ + +1.000000E+000 \ No newline at end of file diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DiffErrorHandler.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DiffErrorHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..4c9a5b29ae9e59ff9defce98f715bdc183f0a4a6 --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DiffErrorHandler.java @@ -0,0 +1,90 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.List; + +import org.custommonkey.xmlunit.Difference; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +public class DiffErrorHandler implements ErrorHandler { + private List errors = new ArrayList(); + private List warnings = new ArrayList(); + private static final String NEWLINE = System.getProperty("line.separator"); + private boolean hasErrors = false; + + private StringBuilder description = new StringBuilder(); + private String source; + private String kind; + + public String getErrorsText() { + return description.toString(); + } + + public boolean hasErrors() { + return hasErrors; + } + + public synchronized void reset(boolean clearLog) { + hasErrors = false; + if (clearLog) { + description = new StringBuilder(); + } + } + /************************************************************* + * + * Parser error handler + * + *************************************************************/ + //@Override + public void error(SAXParseException err) throws SAXException { + errors.add(err); + appendDescripion(err); + hasErrors = true; + XmlDiff.logger.severe("Error while parsing ", kind, ": ", err.getMessage(), "\nDocument: \n", source); + } + + //@Override + public void fatalError(SAXParseException err) throws SAXException { + errors.add(err); + appendDescripion(err); + hasErrors = true; + XmlDiff.logger.severe("Fatal error while parsing ", kind, ": ", err.getMessage(), "\nDocument: \n", source); + } + + private synchronized void appendDescripion(Throwable err) { + StringWriter sw = new StringWriter(); + err.printStackTrace(new PrintWriter(sw)); + description.append(sw).append(NEWLINE); + } + //@Override + public void warning(SAXParseException warn) throws SAXException { + warnings.add(warn); + XmlDiff.logger.warning("Warning while parsing ", kind, ": ", warn.getMessage(), "\nDocument: \n", source); + } + + /************************************************************ + * + * Differences + * + ************************************************************/ + public void difference(Difference diff) { + hasErrors = true; + appendDescripion(diff); + } + + private synchronized void appendDescripion(Difference diff) { + description.append(diff.getDescription()).append(NEWLINE); + } + + public void setSource(String string) { + this.source = string; + } + + public void setKind(String kind) { + this.kind = kind; + } +} \ No newline at end of file diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DifferenceHandler.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DifferenceHandler.java new file mode 100644 index 0000000000000000000000000000000000000000..30c0cc7cc1124d209826a177d9d2f06bc2b9bbc6 --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DifferenceHandler.java @@ -0,0 +1,196 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.custommonkey.xmlunit.Difference; +import org.custommonkey.xmlunit.DifferenceEngine; +import org.custommonkey.xmlunit.DifferenceListener; +import org.custommonkey.xmlunit.NodeDetail; +import org.w3c.dom.Attr; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.TypeInfo; + +public class DifferenceHandler implements DifferenceListener { + private static final String DOUBLE_TYPE_NAME = "double"; + private static final String FLOAT_TYPE_NAME = "float"; + private Document originalReference; + @SuppressWarnings("unused") + private Document originalTest; + private XPathFactory xpathFactory; + + public DifferenceHandler(Document originalReference, Document originalTest) { + super(); + this.originalReference = originalReference; + this.originalTest = originalTest; + xpathFactory = XPathFactory.newInstance(); + } + + + //@Override + public int differenceFound(Difference difference) { + int id = difference.getId(); + if (id == DifferenceEngine.NAMESPACE_PREFIX_ID) { + return handlePrefixDiff(difference); + } + if (id == DifferenceEngine.TEXT_VALUE_ID) { + return handleValueDiff(difference); + } + if (id == DifferenceEngine.ATTR_VALUE_ID) { + return handleValueDiff(difference); + } + XmlDiff.logger.debug2("Difference accepted: Namespace prefix ID", + difference.getDescription()); + return RETURN_ACCEPT_DIFFERENCE; + } + + + private int handleValueDiff(Difference difference) { + + NodeDetail controlNodeDetail = difference.getControlNodeDetail(); + NodeDetail testNodeDetail = difference.getTestNodeDetail(); + + // XmlDiff clones DOM trees and loses information about type of nodes and attributes + // We need to find corresponding node in the original tree to get information about + // schema type + Node originalNode = findOriginalNode(controlNodeDetail); + + if (originalNode == null) { + return RETURN_ACCEPT_DIFFERENCE; + } + + if (isFloat(originalNode) || isDouble(originalNode)) { + return handleFloat(controlNodeDetail, testNodeDetail); + } + return RETURN_ACCEPT_DIFFERENCE; + } + + private int handleFloat(NodeDetail controlNodeDetail, + NodeDetail testNodeDetail) { + String controlValue = controlNodeDetail.getValue(); + double controlDouble = 0.0; + + try { + controlDouble = Double.parseDouble(controlValue); + } catch (NumberFormatException err) { + XmlDiff.logger.severe("Failed to convert reference value to double {", controlValue, "}: error ", + err.getMessage()); + return RETURN_ACCEPT_DIFFERENCE; + } + + String testValue = testNodeDetail.getValue(); + double testDouble = 0.0; + try { + testDouble = Double.parseDouble(testValue); + } catch (NumberFormatException err) { + XmlDiff.logger.severe("Failed to convert test value to double {", testValue, "}: error ", + err.getMessage()); + return RETURN_ACCEPT_DIFFERENCE; + } + + if (testDouble == controlDouble) { + XmlDiff.logger.debug("Compare {", controlValue, "} and {", testValue, "}: identical"); + return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL; + } else { + XmlDiff.logger.debug("Compare {", controlValue, "} and {", testValue, "}: different"); + return RETURN_ACCEPT_DIFFERENCE; + } + } + + + private Node findOriginalNode(NodeDetail nodeDetail) { + String controlXpath = fixXpath(nodeDetail.getXpathLocation()); + XPath xpath = xpathFactory.newXPath(); + Node result = null; + try { + result = (Node) xpath.evaluate(controlXpath, + originalReference, + XPathConstants.NODE); + } catch (XPathExpressionException e) { + XmlDiff.logger.severe("Failed to process XPATH expression '", + controlXpath, "': error " + e.getMessage()); + return null; + } + if (result == null) { + XmlDiff.logger.severe("Nothing found by XPATH expression '", + controlXpath, "'"); + } + return result; + } + + + private boolean isFloat(Node node) { + return isDerivedFrom(node, FLOAT_TYPE_NAME); + } + + private boolean isDouble(Node node) { + return isDerivedFrom(node, DOUBLE_TYPE_NAME); + } + + + private boolean isDerivedFrom(Node node, String typeName) { + boolean result = false; + if (node.getNodeType() == Node.TEXT_NODE) { + node = node.getParentNode(); + } + TypeInfo typeinfo = guessTypeInfo(node); + if (typeinfo == null) { + XmlDiff.logger.info("No type info found: node ", node.getNodeName()); + return false; + } + + result = typeinfo.isDerivedFrom( + "http://www.w3.org/2001/XMLSchema", + typeName, + TypeInfo.DERIVATION_RESTRICTION) + || typeinfo.isDerivedFrom( + "http://www.w3.org/2001/XMLSchema", + typeName, + TypeInfo.DERIVATION_EXTENSION); + XmlDiff.logger.debug2("isDerivedFrom(", typeName, ") == ", result, ": type ", typeinfo.getTypeName(), + ", node ", node.getNodeName()); + return result; + } + + + private int handlePrefixDiff(Difference difference) { + XmlDiff.logger.debug3("Difference ignored: Namespace prefix ID", + difference.getDescription()); + return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL; + } + + + //@Override + public void skippedComparison(Node control, Node test) { + } + // Transform XPath from /nodename[1]/ to /[local-name()='nodename'/ + // The reason is that the order of nodes is not strictly defined in an XML document due to . + private static String fixXpath(String orig) { + // This regular expression is invalid: it fails on names like ns1:MyType日本 + // String result = orig.replaceAll("/([a-zA-Z0-9_-]+)(\\[[0-9]+\\](/|$))?", "/*[local-name()='$1']$2"); + // Simplified regex: (any character distinct from [)+ + String result = orig.replaceAll("/([^\\[/]+)(\\[[0-9]+\\](/|$))?", "/*[local-name()='$1']$2"); + XmlDiff.logger.debug2("Original xpath: {", orig, "}, modified: {", result, "}"); + return result; + } + + private static TypeInfo guessTypeInfo(Node node) { + TypeInfo typeinfo = null; + if (node.getNodeType() == Node.ELEMENT_NODE) { + Element element = (Element)node; + + typeinfo = element.getSchemaTypeInfo(); + } + if (node.getNodeType() == Node.ATTRIBUTE_NODE) { + Attr attr = (Attr)node; + + typeinfo = attr.getSchemaTypeInfo(); + } + + return typeinfo; + } +} \ No newline at end of file diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DomTraversal.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DomTraversal.java new file mode 100644 index 0000000000000000000000000000000000000000..fc0957e90f68cc53d132652ccaa2fa7a1e59f147 --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/DomTraversal.java @@ -0,0 +1,34 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +/** Internal type for debugging purposes. + * + * Do not use. + */ +class DomTraversal { + public void processNode(Node node, String prefix) { + System.out.println(prefix + "#" + node.hashCode()); + if (node.getNodeType() == Node.DOCUMENT_NODE) { + System.out.println(prefix + "Document: " + node.getNodeName()); + } else if (node.getNodeType() == Node.ELEMENT_NODE) { + System.out.println(prefix + "Element: " + node.getNodeName()); + Element element = (Element) node; + System.out.println(prefix + "--" + element.getSchemaTypeInfo().getTypeName()); + } else if (node.getNodeType() == Node.TEXT_NODE) { + System.out.println(prefix + "Text: {" + node.getTextContent() + "}"); + } else { + System.out.println(prefix + "smt else: " + node.getNodeType() + + "{" + node.getClass() + "}: {" + node.getTextContent() + "}"); + } + Node child = node.getFirstChild(); + while (child != null) { + processNode(child, prefix+" "); + child = child.getNextSibling(); + } + } + public void processNode(Node node) { + processNode(node, ""); + } +} diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/FeatureSpec.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/FeatureSpec.java new file mode 100644 index 0000000000000000000000000000000000000000..d507214f926444afc5816a3bae918df127199602 --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/FeatureSpec.java @@ -0,0 +1,18 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +public class FeatureSpec { + private String name; + private boolean value; + public FeatureSpec(String name, boolean value) { + super(); + this.name = name; + this.value = value; + } + public String getName() { + return name; + } + public boolean getValue() { + return value; + } +} + \ No newline at end of file diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/LogUtil.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/LogUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..3e6f70ba4f512aec9991df001a12622aba61c0fe --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/LogUtil.java @@ -0,0 +1,64 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +public class LogUtil { + public final Logger logger; + + public LogUtil(Logger logger) { + super(); + this.logger = logger; + } + + private void _log(Level lvl, Object... args) { + if (!logger.isLoggable(lvl)) return; + + StringBuilder msg = new StringBuilder(); + StackTraceElement[] trace = Thread.currentThread().getStackTrace(); + StackTraceElement caller = null; + if (trace.length > 3) { + caller = trace[3]; + } + if (caller != null) { + msg.append(caller.getFileName()).append(':'); + msg.append(caller.getLineNumber()).append(':'); +// msg.append(caller.getClassName()).append(':'); +// msg.append(caller.getMethodName()).append(':'); + } + + for (Object arg : args) { + msg.append(arg); + } + LogRecord record = new LogRecord(lvl, msg.toString()); + if (caller != null) { + record.setSourceClassName(caller.getClassName()); + record.setSourceMethodName(caller.getMethodName()); + } + logger.log(record); + + } + + public void severe(Object... args) { + _log(Level.SEVERE, args); + } + public void warning(Object... args) { + _log(Level.WARNING, args); + } + public void config(Object... args) { + _log(Level.CONFIG, args); + } + public void info(Object... args) { + _log(Level.INFO, args); + } + public void debug(Object... args) { + _log(Level.FINE, args); + } + public void debug2(Object... args) { + _log(Level.FINER, args); + } + public void debug3(Object... args) { + _log(Level.FINEST, args); + } +} diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiff.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiff.java new file mode 100644 index 0000000000000000000000000000000000000000..0ecc21d244f5a414970cd6f90a507a47ad7eb9c6 --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiff.java @@ -0,0 +1,327 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.io.StringReader; +import java.nio.CharBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.logging.FileHandler; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Source; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.custommonkey.xmlunit.DetailedDiff; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.Difference; +import org.custommonkey.xmlunit.XMLUnit; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/** This class implements an algorithm to compare two XML files. + * + * It is used as a utility in the ETSI STF on conformance testing for XSD processing (TTCN3 Part 9 specification). + * @author pakulin + * + */ +public class XmlDiff { + public static LogUtil logger = null; + static { + logger = new LogUtil(Logger.getLogger("org.etsi.mts.ttcn.part9.xmldiff")); + logger.logger.setLevel(Level.FINE); + try { + FileHandler fh = new FileHandler("XmlDiff.log", true); + fh.setLevel(Level.FINE); + logger.logger.addHandler(fh); + } catch (SecurityException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + static { + XMLUnit.setIgnoreComments(true); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); + } + + protected File referenceXmlFile; + private List xsdFiles; + private Schema schemes = null; + private DocumentBuilderFactory xmlParserFactory; + private DiffErrorHandler errorHandler = new DiffErrorHandler(); + private Document controlDoc; + private Document testDoc; + + /** Initialize the diff engine. + * + * If {@code xsdFileNames} is null then the value of {@code xsdSearchPath} + * is ignored. + * + * @param referenceXmlFile path to the reference XML file + * @param xsdFileNames optional list of XSD files relevant for the reference XML file. + * May be null. + * @param xsdSearchPath optional list of folder names and/or URIs where to look for XSD files. + * May be null. + * + */ + public XmlDiff(String referenceXmlFile, String[] xsdFileNames, String[] xsdSearchPath) { + this(new File(referenceXmlFile), xsdFileNames, xsdSearchPath); + } + + /** Initialize the diff engine. + * + * If {@code xsdFileNames} is null then the value of {@code xsdSearchPath} + * is ignored. + * + * @param file path to the reference XML file + * @param xsdFileNames optional list of XSD files relevant for the reference XML file. + * May be null. + * @param xsdSearchPath optional list of folder names and/or URIs where to look for XSD files. + * May be null. + * + */ + public XmlDiff(File file, String[] xsdFileNames, String[] xsdSearchPath) { + logger.debug("Reference file: ", file, + ", xsd file names: ", (xsdFileNames == null)? "null" : Arrays.toString(xsdFileNames), + ", xsd search path: ", (xsdSearchPath == null)? "null" : Arrays.toString(xsdSearchPath)); + this.referenceXmlFile = file; + if (!this.referenceXmlFile.exists()) { + logger.severe("No such file: ", this.referenceXmlFile.getAbsolutePath()); + throw new IllegalArgumentException("No such file: " + this.referenceXmlFile.getAbsolutePath()); + } + if (!this.referenceXmlFile.canRead()) { + logger.severe("Can't read: ", this.referenceXmlFile.getAbsolutePath()); + throw new IllegalArgumentException("Can't read: " + this.referenceXmlFile.getAbsolutePath()); + } + +// XMLUnit.setControlParser( +// "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"); +// // this next line is strictly not required - if no test parser is +// // explicitly specified then the same factory class will be used for +// // both test and control +// XMLUnit.setTestParser( +// "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"); +// +// XMLUnit.setSAXParserFactory( +// "org.apache.xerces.jaxp.SAXParserFactoryImpl"); + // XMLUnit.setTransformerFactory( + // "org.apache.xalan.processor.TransformerFactoryImpl"); + + xmlParserFactory = DocumentBuilderFactory.newInstance(); + xmlParserFactory.setIgnoringComments(true); + xmlParserFactory.setCoalescing(true); + xmlParserFactory.setIgnoringElementContentWhitespace(true); + + xsdFiles = new ArrayList(); + List missing; + + missing = findXsdFiles(xsdFileNames, xsdSearchPath); + if (missing != null) { + logger.severe("Missing XSD files " + missing + " in search path " + Arrays.toString(xsdSearchPath)); + throw new IllegalArgumentException("Missing XSD files " + missing + " in search path " + Arrays.toString(xsdSearchPath)); + } + + if (xsdFiles.size() > 0) { + addXmlSchemas(); + } + } + + /** Compare an XML document against the reference one. + * @param input the text of the XML document + * @param errorMessage container to store details of differences. May be null + * @return true if the documents match and false otherwise. + * @throws XmlDiffError if an error occurs before or during diffing + */ + public boolean diff(String input, StringBuilder diffDetails) throws XmlDiffError { + logger.debug("Looking for difference: reference file ", referenceXmlFile, ", input {", input, "}"); + InputStream stream; + try { + stream = new FileInputStream(referenceXmlFile); + } catch (FileNotFoundException e) { + logger.severe("File not found: ", referenceXmlFile.getAbsolutePath()); + throw new XmlDiffError(e); + } +// Reader rd = new InputStreamReader(stream, StandardCharsets.UTF_8); + Reader rd = new InputStreamReader(stream, Charset.forName("utf-8")); + StringReader inputReader = new StringReader(input); + boolean v = diff(rd, inputReader, diffDetails); + if (!v) { + logger.info("Compared reference file ", referenceXmlFile, " with input {", input, "}, found differences ", diffDetails); + } else { + logger.debug("No differences found between reference file ", referenceXmlFile, " and input {", input, "}"); + } + return v; + } + + /** Created for debugging purposes + * @param input + * @param diffDetails + * @return + * @throws XmlDiffError + */ + public boolean diff(Reader input, StringBuilder diffDetails) throws XmlDiffError { + InputStream stream; + try { + stream = new FileInputStream(referenceXmlFile); + } catch (FileNotFoundException e) { + throw new XmlDiffError(e); + } + Reader rd = new InputStreamReader(stream, StandardCharsets.UTF_8); + return diff(rd, input, diffDetails); + } + + /*********************************************************************** + * + * Private methods + * + ***********************************************************************/ + + + private boolean diff(Reader expected, Reader actual, + StringBuilder diffDetails) throws XmlDiffError { + + Diff differ = null; + try { +// differ = new Diff(expected, actual); + differ = createDiffer(expected, actual); + } catch (SAXException e) { + throw new XmlDiffError("Failed to parse XML", e); + } catch (IOException e) { + throw new XmlDiffError("Failed to read XML", e); + } + if (errorHandler.hasErrors()) { + diffDetails.append(errorHandler.getErrorsText()); + return false; + } + + boolean result = differ.identical() || differ.similar(); + + if (!result) { + DetailedDiff details = new DetailedDiff(differ); + @SuppressWarnings("unchecked") + List diffs = details.getAllDifferences(); + if (diffs.isEmpty()) { + result = true; + } else { + for (Difference diff : diffs) { + diffDetails.append(diff.toString()).append('\n'); + } + } + } + return result; + } + + private void addXmlSchemas() { + SchemaFactory schemaFactory = + SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); + Source[] schemaSources = new Source[xsdFiles.size()]; + for (int i = 0; i < schemaSources.length; i++) { + schemaSources[i] = new StreamSource(xsdFiles.get(i)); + } + try { + schemes = schemaFactory.newSchema(schemaSources); + } catch (SAXException e) { + throw new IllegalArgumentException("Failed to parse a schema file", e); + } + if (schemes != null) { + xmlParserFactory.setSchema(schemes); + xmlParserFactory.setValidating(false); + xmlParserFactory.setNamespaceAware(true); + } + } + + private List findXsdFiles(String[] xsdFileNames, String[] xsdSearchPath) { + if (xsdFileNames == null || xsdFileNames.length == 0) { + return null; + } + List missing = new ArrayList(); + if (xsdSearchPath == null || xsdSearchPath.length == 0) { + for (String name : xsdFileNames) { + if (name == null) { + logger.severe("XSD file name is nul!!!"); + continue; + } else { + logger.debug("Looking for XSD file ", name); + } + File guess = new File(name); + if (guess.exists()) { + xsdFiles.add(guess); + } else { + missing.add(name); + } + } + } else { + for (String fileName : xsdFileNames) { + boolean found = false; + for (String path: xsdSearchPath) { + File guess = new File(path, fileName); + if (guess.exists()) { + xsdFiles.add(guess); + found = true; + break; + } + } + if (!found) { + missing.add(fileName); + } + } + } + return (missing.size() > 0) ? missing : null; + } + + private Document parseXml(Reader inReader, String kind) throws SAXException, IOException, XmlDiffError { + DocumentBuilder parser; + logger.debug2("Parse ", kind); + try { + parser = xmlParserFactory.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + logger.severe("Failed to setup a parser for ", kind, ": ", e.getMessage()); + throw new RuntimeException("Internal error: failed to create an XML parser", e); + } + { + CharBuffer cb = CharBuffer.allocate(1000); + StringBuilder tmp = new StringBuilder(); + while(inReader.read(cb) != -1) { + cb.flip(); + tmp.append(cb.toString()); + cb.clear(); + } + errorHandler.setSource(tmp.toString()); + errorHandler.setKind(kind); + inReader = new StringReader(tmp.toString()); + } + parser.setErrorHandler(errorHandler); + InputSource input = new InputSource(inReader); + Document result = parser.parse(input); + if (errorHandler.hasErrors()) { + throw new XmlDiffError("Failed to parse " + kind + ": " + errorHandler.getErrorsText()); + } + return result; + } + + private Diff createDiffer(Reader control, Reader test) throws SAXException, IOException, XmlDiffError { + controlDoc = parseXml(control, "sample XML file"); + testDoc = parseXml(test, "generated XML document"); + Diff result = new Diff(controlDoc, testDoc); + result.overrideDifferenceListener(new DifferenceHandler(controlDoc, testDoc)); + return result; + } +} diff --git a/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiffError.java b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiffError.java new file mode 100644 index 0000000000000000000000000000000000000000..80d842fff2e210c8f93194a364549a074ec344ac --- /dev/null +++ b/tools/XmlDiff/src/org/etsi/mts/ttcn/part9/xmldiff/XmlDiffError.java @@ -0,0 +1,26 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +public class XmlDiffError extends Exception { + + /** + * + */ + private static final long serialVersionUID = -1525558587675191780L; + + public XmlDiffError() { + super(); + } + + public XmlDiffError(String message, Throwable cause) { + super(message, cause); + } + + public XmlDiffError(String message) { + super(message); + } + + public XmlDiffError(Throwable cause) { + super(cause); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/AllTests.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/AllTests.java new file mode 100644 index 0000000000000000000000000000000000000000..b68f3652a53b9df6f6a4e34aa3d8005ef70a4e7f --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/AllTests.java @@ -0,0 +1,23 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import org.etsi.mts.ttcn.part9.xmldiff.regression.AllRegressionTests; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ Test_001.class, TestDiff_002.class, TestDiff_003.class, + TestDiff_004_boolean.class, TestDiff_005_fixed_fraction.class, + TestDiff_005_fixed_no_fraction.class, TestDiff_005_float.class, + TestDiff_005_float_attribute.class, + TestDiff_005_float_complex_content.class, + TestDiff_006.class, + TestDiff_007_MultipleXSD.class, + TestDiff_008_double.class, + TestDiff_009_float_union.class, + + AllRegressionTests.class + }) +public class AllTests { + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_002.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_002.java new file mode 100644 index 0000000000000000000000000000000000000000..3cf4fdea063083546a55509ff62a6441b89588c0 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_002.java @@ -0,0 +1,89 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +public class TestDiff_002 { + public static String FILE_base = "Pos_070401_AttributeElementDefinition_001_01_base.xml"; + public static String FILE_whitespace = "Pos_070401_AttributeElementDefinition_001_02_whitespace.xml"; + public static String FILE_comment = "Pos_070401_AttributeElementDefinition_001_03_comment.xml"; + public static String FILE_nmsp_prefix = "Pos_070401_AttributeElementDefinition_001_04_nmsp_prefix.xml"; + public static String FILE_attr_order = "Pos_070401_AttributeElementDefinition_001_05_attr_order.xml"; + public static String FILE_no_nmsp_prefix = "Pos_070401_AttributeElementDefinition_001_06_no_nmsp_prefix.xml"; + public static String FILE_escape = "Pos_070401_AttributeElementDefinition_001_07_escape.xml"; + public static String FILE_xsd = "Pos_070401_AttributeElementDefinition_001.xsd"; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File("xml/002"); + differ = new XmlDiff(new File(root, FILE_base), new String[]{FILE_xsd}, new String[]{"xml/002"}); + errors = new StringBuilder(); + } + + @Test + public void test_whitespace() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_whitespace)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_comment() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_comment)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_nmsp_prefix() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_nmsp_prefix)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_attr_order() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_attr_order)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_no_nmsp_prefix() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_nmsp_prefix)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_escape() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_escape)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_003.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_003.java new file mode 100644 index 0000000000000000000000000000000000000000..90dc9b4b5b558a4f355ac406c8160dabd4c1a807 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_003.java @@ -0,0 +1,71 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_003 { + public static String XSD_FILE = "003_grammar.xsd"; + public static String FILE_without_ns = "xml_without_ns.xml"; + public static String FILE_with_ns = "xml_with_ns.xml"; + public static String FILE_base = FILE_without_ns; + public static String FILE_ttwb = "generated_ttwb.xml"; + public static String FILE_tc = "generated_tc.xml"; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File("xml/003"); + differ = new XmlDiff(new File(root, FILE_base), new String[]{XSD_FILE}, + new String[]{"xml/003"}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_ttwb() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_ttwb)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test(expected=XmlDiffError.class) + public void test_tc() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_tc)); + + boolean v = differ.diff(actual, errors); + + assertFalse(v); + assertTrue(errors.toString().contains("attribute")); + } + + @Test + public void test_nons_vs_withns() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_without_ns)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_004_boolean.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_004_boolean.java new file mode 100644 index 0000000000000000000000000000000000000000..7cb685780044fa182a6b1523cae24fd670421c9e --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_004_boolean.java @@ -0,0 +1,52 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_004_boolean { + public static final String FOLDER = "xml/004_boolean"; + public static String XSD_FILE = "004_boolean_item.xsd"; + public static String FILE_with_true = "boolean_true.xml"; + public static String FILE_with_1 = "boolean_1.xml"; + public static String FILE_base = FILE_with_true; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_1_to_true() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_with_1)); + + boolean v = differ.diff(actual, errors); + + assertFalse(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_fraction.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_fraction.java new file mode 100644 index 0000000000000000000000000000000000000000..e5e04f7b2d586e0a2b6547950a30c57f200536c2 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_fraction.java @@ -0,0 +1,97 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_005_fixed_fraction { + public static final String FOLDER = "xml/005_real"; + public static String XSD_FILE = "005_real_item.xsd"; + public static String FILE_no_fraction = "01_fixed_no_fraction.xml"; + public static String FILE_no_fraction_0 = "01_fixed_no_fraction_0.xml"; + public static String FILE_no_fraction_00 = "01_fixed_no_fraction_00.xml"; + public static String FILE_no_fraction__plus = "01_fixed_no_fraction__plus.xml"; + public static String FILE_no_fraction_0_plus = "01_fixed_no_fraction_0_plus.xml"; + public static String FILE_no_fraction_00_plus = "01_fixed_no_fraction_00_plus.xml"; + public static final String FILE_base = FILE_no_fraction; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_0() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_fraction_0)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_00() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_fraction_00)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test__plus() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_fraction__plus)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_0_plus() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_fraction_0_plus)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_00_plus() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_no_fraction_00_plus)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_no_fraction.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_no_fraction.java new file mode 100644 index 0000000000000000000000000000000000000000..c4458af1304caea0b3d906d66ccf6d0e1315de21 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_fixed_no_fraction.java @@ -0,0 +1,64 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_005_fixed_no_fraction { + public static final String FOLDER = "xml/005_real"; + public static String XSD_FILE = "005_real_item.xsd"; + public static String FILE_fraction = "02_fixed_fraction.xml"; + public static String FILE_fraction_0 = "02_fixed_fraction_0.xml"; + public static String FILE_fraction_00 = "02_fixed_fraction_00.xml"; + public static final String FILE_base = FILE_fraction; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_0() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_fraction_0)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_00() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_fraction_00)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float.java new file mode 100644 index 0000000000000000000000000000000000000000..1ad96cf14384f98e8cdbc6edd33a5e0b3b30732d --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float.java @@ -0,0 +1,85 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_005_float { + public static final String FOLDER = "xml/005_real"; + public static String XSD_FILE = "005_real_item.xsd"; + public static String FILE_fixed = "03_fixed.xml"; + public static String FILE_float_2 = "03_float+2.xml"; + public static String FILE_float_1 = "03_float+1.xml"; + public static String FILE_float_0 = "03_float+0.xml"; + public static String FILE_float__1 = "03_float-1.xml"; + public static final String FILE_base = FILE_fixed; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_2() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float_2)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_1() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float_1)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + @Test + public void test_0() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float_0)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test__1() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float__1)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_attribute.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_attribute.java new file mode 100644 index 0000000000000000000000000000000000000000..d69a70d2c5eb79b1851e9c1cb45c7a23f76dfee3 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_attribute.java @@ -0,0 +1,53 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_005_float_attribute { + public static final String FOLDER = "xml/005_real"; + public static String XSD_FILE = "005_float_attribute.xsd"; + public static String FILE_fixed = "04_attribute_fixed.xml"; + public static String FILE_float = "04_attribute_float.xml"; + public static final String FILE_base = FILE_fixed; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + +// @Test +// public void test_self() throws IOException, XmlDiffError { +// actual = new FileReader(new File(root, FILE_base)); +// +// boolean v = differ.diff(actual, errors); +// assertEquals("", errors.toString()); +// assertTrue(v); +// } + + @Test + public void test_float() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_complex_content.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_complex_content.java new file mode 100644 index 0000000000000000000000000000000000000000..42850bc60a380911a3695096071b1c29d4113783 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_005_float_complex_content.java @@ -0,0 +1,53 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_005_float_complex_content { + public static final String FOLDER = "xml/005_real"; + public static String XSD_FILE = "005_float_attribute.xsd"; + public static String FILE_fixed = "05_complex_content_fixed.xml"; + public static String FILE_float = "05_complex_content_float.xml"; + public static final String FILE_base = FILE_fixed; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + +// @Test +// public void test_self() throws IOException, XmlDiffError { +// actual = new FileReader(new File(root, FILE_base)); +// +// boolean v = differ.diff(actual, errors); +// assertEquals("", errors.toString()); +// assertTrue(v); +// } + + @Test + public void test_float() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_float)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_006.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_006.java new file mode 100644 index 0000000000000000000000000000000000000000..09dc689e7e50267255f34173b26682b0fc5c045b --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_006.java @@ -0,0 +1,29 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.IOException; + +import org.junit.Test; + +public class TestDiff_006 { + public static final String FOLDER = "xml/006_bug"; + public static final String REFERENCE_XML = "Pos_060307_unsigned_long_001.xml"; + public static final String XSD = "Pos_060307_unsigned_long_001.xsd"; + public static final String TEST_XML_TEXT = + "18446744073709551615"; + + @Test + public void test_generated() throws IOException, XmlDiffError { + XmlDiff differ = new XmlDiff(FOLDER + "/" + REFERENCE_XML, + new String[]{XSD}, new String[]{FOLDER}); + + StringBuilder error = new StringBuilder(); + boolean v = differ.diff(TEST_XML_TEXT, error); + + assertEquals("", error.toString()); + assertTrue("The XML files must be considered similar", v); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_007_MultipleXSD.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_007_MultipleXSD.java new file mode 100644 index 0000000000000000000000000000000000000000..102d4661d3685f4de870e71fce02ad81db20b110 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_007_MultipleXSD.java @@ -0,0 +1,38 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import static org.junit.Assert.*; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; + +import org.junit.Test; + +public class TestDiff_007_MultipleXSD { + public static final String PREFIX = "xml/007_multiple_xsd"; + public static final String REFERENCE_XML = PREFIX + "/Pos_050101_namespaces_003.xml"; + public static final String[] XSDs = new String[]{ + "test_data/Pos_050101_namespaces_003_merged.xsd" + }; + public static final String[] XSD_PATH = new String[]{ + PREFIX + }; + + + @Test + public void test_1() throws IOException, XmlDiffError { + XmlDiff differ = new XmlDiff(REFERENCE_XML, XSDs, XSD_PATH); + String textXml = "some.xml"; + String text = new String(Files.readAllBytes(Paths.get(PREFIX, textXml)), + StandardCharsets.UTF_8 + ); + StringBuilder error = new StringBuilder(); + + boolean v = differ.diff(text, error); + + assertEquals("", error.toString()); + assertTrue("The XML files must be considered similar", v); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_008_double.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_008_double.java new file mode 100644 index 0000000000000000000000000000000000000000..3655c628faa4aa2091a592208cac4fecd4111caa --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_008_double.java @@ -0,0 +1,54 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_008_double { + public static final String FOLDER = "xml/008_double"; + public static String XSD_FILE = "008_double.xsd"; + public static String FILE_1= "regression_E.xml"; + public static String FILE_2 = "regression_E_000.xml"; + public static final String FILE_base = FILE_1; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_2() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_2)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_009_float_union.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_009_float_union.java new file mode 100644 index 0000000000000000000000000000000000000000..582d7a91273b9da9016a2581d63779b3d8625492 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/TestDiff_009_float_union.java @@ -0,0 +1,54 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TestDiff_009_float_union { + public static final String FOLDER = "xml/009_derived_by_union"; + public static String XSD_FILE = "009_union.xsd"; + public static String FILE_1= "regression_fixed.xml"; + public static String FILE_2 = "regression_float.xml"; + public static final String FILE_base = FILE_1; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_2() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_2)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/Test_001.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/Test_001.java new file mode 100644 index 0000000000000000000000000000000000000000..50e046c88ffbcb10dc33cf152bdc6962cdfccbd3 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/Test_001.java @@ -0,0 +1,30 @@ +package org.etsi.mts.ttcn.part9.xmldiff; + +import static org.junit.Assert.*; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; + +import org.junit.Test; + +public class Test_001 { + public static final String PREFIX = "xml/001"; + public static final String REFERENCE_XML = PREFIX + "/books.xml"; + + @Test + public void pos_001_nowhitespaces() throws IOException, XmlDiffError { + XmlDiff differ = new XmlDiff(REFERENCE_XML, null, null); + String textXml = "books_nowhitespaces.xml"; + String text = new String(Files.readAllBytes(Paths.get(PREFIX, textXml)), + StandardCharsets.UTF_8); + StringBuilder error = new StringBuilder(); + + boolean v = differ.diff(text, error); + + assertEquals("", error.toString()); + assertTrue("The XML files must be considered similar", v); + } + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/AllRegressionTests.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/AllRegressionTests.java new file mode 100644 index 0000000000000000000000000000000000000000..ae7dacb36ff6f90ed7d3c1109707dec9f6b86c90 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/AllRegressionTests.java @@ -0,0 +1,12 @@ +package org.etsi.mts.ttcn.part9.xmldiff.regression; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ RegressionTest_001.class + }) +public class AllRegressionTests { + +} diff --git a/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/RegressionTest_001.java b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/RegressionTest_001.java new file mode 100644 index 0000000000000000000000000000000000000000..c32fe443d121201f42a797e48210cda308bb8b62 --- /dev/null +++ b/tools/XmlDiff/tests/org/etsi/mts/ttcn/part9/xmldiff/regression/RegressionTest_001.java @@ -0,0 +1,56 @@ +package org.etsi.mts.ttcn.part9.xmldiff.regression; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.Reader; + +import org.etsi.mts.ttcn.part9.xmldiff.XmlDiff; +import org.etsi.mts.ttcn.part9.xmldiff.XmlDiffError; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class RegressionTest_001 { + public static final String FOLDER = "regression/001_float_chinese_typename"; + public static String XSD_FILE = "Pos_050202_name_conversion_rules_014.xsd"; + public static String FILE_1= "Pos_050202_name_conversion_rules_014.xml"; + public static String FILE_2 = "sample.xml"; + public static final String FILE_base = FILE_1; + + private File root; + private XmlDiff differ; + private StringBuilder errors; + private Reader actual; + + @Before + public void setUp() throws IOException { + root = new File(FOLDER); + differ = new XmlDiff( + new File(root, FILE_base), + new String[]{XSD_FILE}, + new String[]{FOLDER}); + errors = new StringBuilder(); + } + + @Test + public void test_self() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_base)); + + boolean v = differ.diff(actual, errors); + assertEquals("", errors.toString()); + assertTrue(v); + } + + @Test + public void test_2() throws IOException, XmlDiffError { + actual = new FileReader(new File(root, FILE_2)); + + boolean v = differ.diff(actual, errors); + + assertEquals("", errors.toString()); + assertTrue(v); + } + +} diff --git a/tools/XmlDiff/xml/001/books.xml b/tools/XmlDiff/xml/001/books.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c254f1204dd2ab10e0585c934a9f24cb478aeb2 --- /dev/null +++ b/tools/XmlDiff/xml/001/books.xml @@ -0,0 +1,120 @@ + + + + Gambardella, Matthew + XML Developer's Guide + Computer + 44.95 + 2000-10-01 + An in-depth look at creating applications + with XML. + + + Ralls, Kim + Midnight Rain + Fantasy + 5.95 + 2000-12-16 + A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world. + + + Corets, Eva + Maeve Ascendant + Fantasy + 5.95 + 2000-11-17 + After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society. + + + Corets, Eva + Oberon's Legacy + Fantasy + 5.95 + 2001-03-10 + In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant. + + + Corets, Eva + The Sundered Grail + Fantasy + 5.95 + 2001-09-10 + The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy. + + + Randall, Cynthia + Lover Birds + Romance + 4.95 + 2000-09-02 + When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled. + + + Thurman, Paula + Splish Splash + Romance + 4.95 + 2000-11-02 + A deep sea diver finds true love twenty + thousand leagues beneath the sea. + + + Knorr, Stefan + Creepy Crawlies + Horror + 4.95 + 2000-12-06 + An anthology of horror stories about roaches, + centipedes, scorpions and other insects. + + + Kress, Peter + Paradox Lost + Science Fiction + 6.95 + 2000-11-02 + After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum. + + + O'Brien, Tim + Microsoft .NET: The Programming Bible + Computer + 36.95 + 2000-12-09 + Microsoft's .NET initiative is explored in + detail in this deep programmer's reference. + + + O'Brien, Tim + MSXML3: A Comprehensive Guide + Computer + 36.95 + 2000-12-01 + The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more. + + + Galos, Mike + Visual Studio 7: A Comprehensive Guide + Computer + 49.95 + 2001-04-16 + Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. + + diff --git a/tools/XmlDiff/xml/001/books_nowhitespaces.xml b/tools/XmlDiff/xml/001/books_nowhitespaces.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb9d8ebb941ececfe384a9b3cfc471104f696c22 --- /dev/null +++ b/tools/XmlDiff/xml/001/books_nowhitespaces.xml @@ -0,0 +1,22 @@ +Gambardella, MatthewXML Developer's GuideComputer44.952000-10-01An in-depth look at creating applications + with XML.Ralls, KimMidnight RainFantasy5.952000-12-16A former architect battles corporate zombies, + an evil sorceress, and her own childhood to become queen + of the world.Corets, EvaMaeve AscendantFantasy5.952000-11-17After the collapse of a nanotechnology + society in England, the young survivors lay the + foundation for a new society.Corets, EvaOberon's LegacyFantasy5.952001-03-10In post-apocalypse England, the mysterious + agent known only as Oberon helps to create a new life + for the inhabitants of London. Sequel to Maeve + Ascendant.Corets, EvaThe Sundered GrailFantasy5.952001-09-10The two daughters of Maeve, half-sisters, + battle one another for control of England. Sequel to + Oberon's Legacy.Randall, CynthiaLover BirdsRomance4.952000-09-02When Carla meets Paul at an ornithology + conference, tempers fly as feathers get ruffled.Thurman, PaulaSplish SplashRomance4.952000-11-02A deep sea diver finds true love twenty + thousand leagues beneath the sea.Knorr, StefanCreepy CrawliesHorror4.952000-12-06An anthology of horror stories about roaches, + centipedes, scorpions and other insects.Kress, PeterParadox LostScience Fiction6.952000-11-02After an inadvertant trip through a Heisenberg + Uncertainty Device, James Salway discovers the problems + of being quantum.O'Brien, TimMicrosoft .NET: The Programming BibleComputer36.952000-12-09Microsoft's .NET initiative is explored in + detail in this deep programmer's reference.O'Brien, TimMSXML3: A Comprehensive GuideComputer36.952000-12-01The Microsoft MSXML3 parser is covered in + detail, with attention to XML DOM interfaces, XSLT processing, + SAX and more.Galos, MikeVisual Studio 7: A Comprehensive GuideComputer49.952001-04-16Microsoft Visual Studio 7 is explored in depth, + looking at how Visual Basic, Visual C++, C#, and ASP+ are + integrated into a comprehensive development + environment. \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001.xsd b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..41e727340cf2732d3910454cb11c63f4b818ecd8 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_01_base.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_01_base.xml new file mode 100644 index 0000000000000000000000000000000000000000..35775eee134b38e4fe520db26b896d6202370e20 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_01_base.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_02_whitespace.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_02_whitespace.xml new file mode 100644 index 0000000000000000000000000000000000000000..73cb898f187699156b5eaba1af55b2b99aeeb4a3 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_02_whitespace.xml @@ -0,0 +1,9 @@ + + + + test + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_03_comment.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_03_comment.xml new file mode 100644 index 0000000000000000000000000000000000000000..f71fd062db0ed3387cc0a11f8b5ec24137b7f6de --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_03_comment.xml @@ -0,0 +1,5 @@ + + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_04_nmsp_prefix.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_04_nmsp_prefix.xml new file mode 100644 index 0000000000000000000000000000000000000000..158e0b9529f3e622d821c9c0227894817a6fe9e7 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_04_nmsp_prefix.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_05_attr_order.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_05_attr_order.xml new file mode 100644 index 0000000000000000000000000000000000000000..165adb2c014480160666814cc8dc12e68fd6a6a3 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_05_attr_order.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_06_no_nmsp_prefix.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_06_no_nmsp_prefix.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e1e4f8b3fa5f7dd3e5dd0f677692d14c08c255c --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_06_no_nmsp_prefix.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_07_escape.xml b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_07_escape.xml new file mode 100644 index 0000000000000000000000000000000000000000..7253b629aa9d25bd1d5d82511936d6e9f18b9703 --- /dev/null +++ b/tools/XmlDiff/xml/002/Pos_070401_AttributeElementDefinition_001_07_escape.xml @@ -0,0 +1,5 @@ + + + + test + \ No newline at end of file diff --git a/tools/XmlDiff/xml/003/003_grammar.xsd b/tools/XmlDiff/xml/003/003_grammar.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b3aa0fdda8e6d0b2ebde3134efb83c3d469a669d --- /dev/null +++ b/tools/XmlDiff/xml/003/003_grammar.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/tools/XmlDiff/xml/003/generated_tc.xml b/tools/XmlDiff/xml/003/generated_tc.xml new file mode 100644 index 0000000000000000000000000000000000000000..72c51639f9901840f45c3f55c412744e21b8cdd9 --- /dev/null +++ b/tools/XmlDiff/xml/003/generated_tc.xml @@ -0,0 +1,5 @@ + +something diff --git a/tools/XmlDiff/xml/003/generated_ttwb.xml b/tools/XmlDiff/xml/003/generated_ttwb.xml new file mode 100644 index 0000000000000000000000000000000000000000..eea6571fc01d9aa890dc7ad54b34a554d7669130 --- /dev/null +++ b/tools/XmlDiff/xml/003/generated_ttwb.xml @@ -0,0 +1,4 @@ + +something diff --git a/tools/XmlDiff/xml/003/xml_with_ns.xml b/tools/XmlDiff/xml/003/xml_with_ns.xml new file mode 100644 index 0000000000000000000000000000000000000000..7789cb843a1416ea87b1651d399da122716b74d4 --- /dev/null +++ b/tools/XmlDiff/xml/003/xml_with_ns.xml @@ -0,0 +1,5 @@ + +something diff --git a/tools/XmlDiff/xml/003/xml_without_ns.xml b/tools/XmlDiff/xml/003/xml_without_ns.xml new file mode 100644 index 0000000000000000000000000000000000000000..d06c2c189243808204c6a714c58720beb8411475 --- /dev/null +++ b/tools/XmlDiff/xml/003/xml_without_ns.xml @@ -0,0 +1,3 @@ + +something diff --git a/tools/XmlDiff/xml/004_boolean/004_boolean_item.xsd b/tools/XmlDiff/xml/004_boolean/004_boolean_item.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7e40eabed7d3d35faea3148575163c11b92699e5 --- /dev/null +++ b/tools/XmlDiff/xml/004_boolean/004_boolean_item.xsd @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/004_boolean/boolean_1.xml b/tools/XmlDiff/xml/004_boolean/boolean_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..5525af289116ff17cea550b330d2e9aa667361b9 --- /dev/null +++ b/tools/XmlDiff/xml/004_boolean/boolean_1.xml @@ -0,0 +1,2 @@ + +1 diff --git a/tools/XmlDiff/xml/004_boolean/boolean_true.xml b/tools/XmlDiff/xml/004_boolean/boolean_true.xml new file mode 100644 index 0000000000000000000000000000000000000000..33987492d764fdadba3d8d56e1902fa1bc0fc7a3 --- /dev/null +++ b/tools/XmlDiff/xml/004_boolean/boolean_true.xml @@ -0,0 +1,2 @@ + +true diff --git a/tools/XmlDiff/xml/005_real/005_float_attribute.xsd b/tools/XmlDiff/xml/005_real/005_float_attribute.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d207d950dca7709ea6c1f96d2165938c50dedec4 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/005_float_attribute.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/005_real/005_real_item.xsd b/tools/XmlDiff/xml/005_real/005_real_item.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c362877a47b2acb3b0d7858be7072408932f7b9f --- /dev/null +++ b/tools/XmlDiff/xml/005_real/005_real_item.xsd @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae4d9ebcffa0540c9a7e4226efe5949da45f953c --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction.xml @@ -0,0 +1,2 @@ + +100 diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0.xml new file mode 100644 index 0000000000000000000000000000000000000000..ef2d8f82002b93ae376bc9a06286756f0c95008f --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0.xml @@ -0,0 +1,2 @@ + +100.0 diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00.xml new file mode 100644 index 0000000000000000000000000000000000000000..a4443fa92f36571cecc3d63ae66b924e3e902d1d --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00.xml @@ -0,0 +1,2 @@ + +100.00 diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00_plus.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00_plus.xml new file mode 100644 index 0000000000000000000000000000000000000000..3ab9f4cce7ce4bc722d6f0898196a064b3396637 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_00_plus.xml @@ -0,0 +1,2 @@ + ++100.00 diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0_plus.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0_plus.xml new file mode 100644 index 0000000000000000000000000000000000000000..6b0f62687bcc03d1ab0accbb67456df45e0633e4 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction_0_plus.xml @@ -0,0 +1,2 @@ + ++100.0 diff --git a/tools/XmlDiff/xml/005_real/01_fixed_no_fraction__plus.xml b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction__plus.xml new file mode 100644 index 0000000000000000000000000000000000000000..59607bdbec77888b6426ec2138c25cc54482285a --- /dev/null +++ b/tools/XmlDiff/xml/005_real/01_fixed_no_fraction__plus.xml @@ -0,0 +1,2 @@ + ++100 diff --git a/tools/XmlDiff/xml/005_real/02_fixed_fraction.xml b/tools/XmlDiff/xml/005_real/02_fixed_fraction.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee81e3bf733a95a4cfa05f0b5acdbccdc1ca3660 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/02_fixed_fraction.xml @@ -0,0 +1,2 @@ + +100.1234 diff --git a/tools/XmlDiff/xml/005_real/02_fixed_fraction_0.xml b/tools/XmlDiff/xml/005_real/02_fixed_fraction_0.xml new file mode 100644 index 0000000000000000000000000000000000000000..7bf4dfc49e0ea84e9888becbdcde8fb420c21148 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/02_fixed_fraction_0.xml @@ -0,0 +1,2 @@ + +100.12340 diff --git a/tools/XmlDiff/xml/005_real/02_fixed_fraction_00.xml b/tools/XmlDiff/xml/005_real/02_fixed_fraction_00.xml new file mode 100644 index 0000000000000000000000000000000000000000..15505547ec60fff194dbb21734524c2d6aa864ad --- /dev/null +++ b/tools/XmlDiff/xml/005_real/02_fixed_fraction_00.xml @@ -0,0 +1,2 @@ + +100.123400 diff --git a/tools/XmlDiff/xml/005_real/03_fixed.xml b/tools/XmlDiff/xml/005_real/03_fixed.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee81e3bf733a95a4cfa05f0b5acdbccdc1ca3660 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/03_fixed.xml @@ -0,0 +1,2 @@ + +100.1234 diff --git a/tools/XmlDiff/xml/005_real/03_float+0.xml b/tools/XmlDiff/xml/005_real/03_float+0.xml new file mode 100644 index 0000000000000000000000000000000000000000..d9b849fa945a90281601787cdb7cfaa98655c5ed --- /dev/null +++ b/tools/XmlDiff/xml/005_real/03_float+0.xml @@ -0,0 +1,2 @@ + +100.1234e+000 diff --git a/tools/XmlDiff/xml/005_real/03_float+1.xml b/tools/XmlDiff/xml/005_real/03_float+1.xml new file mode 100644 index 0000000000000000000000000000000000000000..90e1f3ab8279834f389ee7d6801257d519515f29 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/03_float+1.xml @@ -0,0 +1,2 @@ + +10.01234e1 diff --git a/tools/XmlDiff/xml/005_real/03_float+2.xml b/tools/XmlDiff/xml/005_real/03_float+2.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c483f22ecd0012e998718bb03a21b1c97016cad --- /dev/null +++ b/tools/XmlDiff/xml/005_real/03_float+2.xml @@ -0,0 +1,2 @@ + +1.001234e2 diff --git a/tools/XmlDiff/xml/005_real/03_float-1.xml b/tools/XmlDiff/xml/005_real/03_float-1.xml new file mode 100644 index 0000000000000000000000000000000000000000..7de9f3e529a5cc98f6f75ad11ee9db26ca026a83 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/03_float-1.xml @@ -0,0 +1,2 @@ + +1001.234e-1 diff --git a/tools/XmlDiff/xml/005_real/04_attribute_fixed.xml b/tools/XmlDiff/xml/005_real/04_attribute_fixed.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d11ff7bfaef766b04e37fac9848b427908a3a53 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/04_attribute_fixed.xml @@ -0,0 +1,2 @@ + +123 diff --git a/tools/XmlDiff/xml/005_real/04_attribute_float.xml b/tools/XmlDiff/xml/005_real/04_attribute_float.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9657b822562e5bcc48584b4e1bdde9595bd1189 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/04_attribute_float.xml @@ -0,0 +1,2 @@ + +123 diff --git a/tools/XmlDiff/xml/005_real/05_complex_content_fixed.xml b/tools/XmlDiff/xml/005_real/05_complex_content_fixed.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d11ff7bfaef766b04e37fac9848b427908a3a53 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/05_complex_content_fixed.xml @@ -0,0 +1,2 @@ + +123 diff --git a/tools/XmlDiff/xml/005_real/05_complex_content_float.xml b/tools/XmlDiff/xml/005_real/05_complex_content_float.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ce766d5ffcf0b0c6c45d66e7a54d431a81fa236 --- /dev/null +++ b/tools/XmlDiff/xml/005_real/05_complex_content_float.xml @@ -0,0 +1,2 @@ + +1.23e+2 diff --git a/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xml b/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..37a698634b4ff55940f1592ab521a9bdcbc9598d --- /dev/null +++ b/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xml @@ -0,0 +1,4 @@ + +18446744073709551615 diff --git a/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xsd b/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6d806abe3814dc75c05275dce92f74aa85762acd --- /dev/null +++ b/tools/XmlDiff/xml/006_bug/Pos_060307_unsigned_long_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xml b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..70476acd4f701a4d6340c570e540d068ca49b850 --- /dev/null +++ b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xsd b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..038f6ff7bb947b4613026988e43a412f19576191 --- /dev/null +++ b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003_1.xsd b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ee7a323c52218a3f66e79689ddf553eb087a3627 --- /dev/null +++ b/tools/XmlDiff/xml/007_multiple_xsd/Pos_050101_namespaces_003_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/tools/XmlDiff/xml/007_multiple_xsd/some.xml b/tools/XmlDiff/xml/007_multiple_xsd/some.xml new file mode 100644 index 0000000000000000000000000000000000000000..c5c43adf800335f5ff8318e7dc0671af578d131a --- /dev/null +++ b/tools/XmlDiff/xml/007_multiple_xsd/some.xml @@ -0,0 +1,3 @@ + +3 diff --git a/tools/XmlDiff/xml/007_multiple_xsd/test_data/Pos_050101_namespaces_003_merged.xsd b/tools/XmlDiff/xml/007_multiple_xsd/test_data/Pos_050101_namespaces_003_merged.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6955c12864372db11e7434f7bb102ca0fdaed9cd --- /dev/null +++ b/tools/XmlDiff/xml/007_multiple_xsd/test_data/Pos_050101_namespaces_003_merged.xsd @@ -0,0 +1,13 @@ + + + + + + diff --git a/tools/XmlDiff/xml/008_double/008_double.xsd b/tools/XmlDiff/xml/008_double/008_double.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1868f7b81234722bf50205551e6744a70439111f --- /dev/null +++ b/tools/XmlDiff/xml/008_double/008_double.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/tools/XmlDiff/xml/008_double/regression_E.xml b/tools/XmlDiff/xml/008_double/regression_E.xml new file mode 100644 index 0000000000000000000000000000000000000000..871dde49c0a7ffd20305f8e008320385c0420c82 --- /dev/null +++ b/tools/XmlDiff/xml/008_double/regression_E.xml @@ -0,0 +1,4 @@ + +1.23E9 diff --git a/tools/XmlDiff/xml/008_double/regression_E_000.xml b/tools/XmlDiff/xml/008_double/regression_E_000.xml new file mode 100644 index 0000000000000000000000000000000000000000..a098a7d97fb2838a65771e913af12863a40adb7f --- /dev/null +++ b/tools/XmlDiff/xml/008_double/regression_E_000.xml @@ -0,0 +1,3 @@ + +1.230000E+009 \ No newline at end of file diff --git a/tools/XmlDiff/xml/009_derived_by_union/009_union.xsd b/tools/XmlDiff/xml/009_derived_by_union/009_union.xsd new file mode 100644 index 0000000000000000000000000000000000000000..10dadaa092da06dfcd1293d6dc4840e7058debbc --- /dev/null +++ b/tools/XmlDiff/xml/009_derived_by_union/009_union.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/XmlDiff/xml/009_derived_by_union/regression_fixed.xml b/tools/XmlDiff/xml/009_derived_by_union/regression_fixed.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b462f671e4780722dc765c73c64ed38667905b1 --- /dev/null +++ b/tools/XmlDiff/xml/009_derived_by_union/regression_fixed.xml @@ -0,0 +1,17 @@ + + +1.000000e+000 \ No newline at end of file diff --git a/tools/XmlDiff/xml/009_derived_by_union/regression_float.xml b/tools/XmlDiff/xml/009_derived_by_union/regression_float.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4ab48c095dc54225a66ac97d636d544ddb25a4b --- /dev/null +++ b/tools/XmlDiff/xml/009_derived_by_union/regression_float.xml @@ -0,0 +1,6 @@ + +1.0 \ No newline at end of file diff --git a/tools/XmlDiff/xmldiff.jardesc b/tools/XmlDiff/xmldiff.jardesc new file mode 100644 index 0000000000000000000000000000000000000000..7b2210fcefde32d62b0445a01ea0ee765b7a91a6 --- /dev/null +++ b/tools/XmlDiff/xmldiff.jardesc @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml/.classpath b/xml/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..1f41b664db27213a3b2086e3fbb9ad1eba60d08a --- /dev/null +++ b/xml/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/xml/.project b/xml/.project new file mode 100644 index 0000000000000000000000000000000000000000..2d03ad10174d4d74884c8524004f9dea089d4137 --- /dev/null +++ b/xml/.project @@ -0,0 +1,39 @@ + + + ATS + + + TTworkbenchAdapter + + + + com.testingtech.ttworkbench.ttthree.modelBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.testingtech.ttworkbench.ttthree.todoBuilder + + + + + com.testingtech.ttworkbench.ttthree.tt3pluginbuilder + + + + + com.testingtech.ttworkbench.ttthree.tt3pluginbuilder + + + + + + com.testingtech.ttworkbench.core.ttcn3nature + org.eclipse.jdt.core.javanature + + diff --git a/xml/.settings/.clfcache/1421766169045Pos_060506_gregorian_year_003.clf b/xml/.settings/.clfcache/1421766169045Pos_060506_gregorian_year_003.clf new file mode 100644 index 0000000000000000000000000000000000000000..1a9d8eecdd51a5ee68bee7b738a5adf31635748e Binary files /dev/null and b/xml/.settings/.clfcache/1421766169045Pos_060506_gregorian_year_003.clf differ diff --git a/xml/.settings/.clfcache/indexFile b/xml/.settings/.clfcache/indexFile new file mode 100644 index 0000000000000000000000000000000000000000..d7f6e2dc6a27dc3f8990885405523cd0af8f29b5 Binary files /dev/null and b/xml/.settings/.clfcache/indexFile differ diff --git a/xml/.settings/com.testingtech.ttworkbench.core.prefs b/xml/.settings/com.testingtech.ttworkbench.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..7285fb9e3b0cd03d63efb5f62977494e3418b627 --- /dev/null +++ b/xml/.settings/com.testingtech.ttworkbench.core.prefs @@ -0,0 +1,26 @@ +clf.output_folder=//PROJECT_NAME//clf +clf.output_same_as_binary=true +eclipse.preferences.version=1 +environment.append=true +environment.variables= +keep_migrated_project_properties=true +notify-maint-contract-expire=true +notify-maint-contract-expired=true +reporting=2 +standard-compliance=error +tt3-plugins-path=//PROJECT_NAME//tt3plugins +ttcn3-version=10 +ttcn3.continue_on_fail=true +ttcn3.gen_debug_code_record_init=false +ttcn3.generate_mlf=false +ttcn3.java_compile_all_at_once=false +ttcn3.main_module= +ttcn3.mlf_class= +ttcn3.mlf_jar= +ttcn3.output_folder=//PROJECT_NAME//ttcn3build +ttcn3.output_same_as_src=false +ttcn3.save_log_automatically=false +ttcn3.source_folders= +ttcn3.tlz.output_folder= +ttcn3.use_bigint=false +ttcn3.use_destination_path_for_ttcn3view=true diff --git a/xml/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs b/xml/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..853f257e52d29cd076792ac9a95137d27d2fe166 --- /dev/null +++ b/xml/.settings/com.testingtech.ttworkbench.xsd.tt3.ui.prefs @@ -0,0 +1,24 @@ +eclipse.preferences.version=1 +gen-xsd-codec=true +xsd-convert-sets-into-records=true +xsd-convert-unions-into-records-of-optionals=false +xsd-generate-all-fields-optional=false +xsd-generate-enumerations=true +xsd-implicitly-import-xsdaux=false +xsd-interleave-text-and-elements=false +xsd-mangle-attribute-names=false +xsd-mangle-element-names=false +xsd-mangle-names-standard-conform=true +xsd-map-any-to-anytype=false +xsd-map-optional-union-fields-to-record-of=true +xsd-map-substitution-groups-with-unions=false +xsd-map-subtyping-with-unions=false +xsd-merge-attributes-into-parent=true +xsd-merge-elements-into-parent=true +xsd-merge-namespaces-into-one-module=false +xsd-output-path=tt3plugins_generated +xsd-package-name= +xsd-profile=standard +xsd-replace-bad-chars-with-underscore=true +xsd-strip-namespaces=false +xsd-use-anyattribute-aux-type=false diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25eb77281938307ba2fee1446052ecfd18c1afcd --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that schema with target namespace is correctly translated into single module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. + +module Pos_050101_namespaces_001 { + + import from schema_Pos_050101_namespaces_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_001.xml", { "Pos_050101_namespaces_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..a79f1fdf6dd81625901004aab244da7b28ed26da --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d102f3d3557e556887fb5ab51cf2e1cf91e61568 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_001/Pos_050101_namespaces_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e7230481760fd7bf519ee369b675a43a437d1d9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify schema with no target namespace is correctly translated into single module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +// The names of the TTCN 3 modules generated based on this clause shall be the result of +// applying the name transformation rules in clause 5.2.2 to ... the predefined name +// "NoTargetNamespace". + +module Pos_050101_namespaces_002 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 2; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_002.xml", { "Pos_050101_namespaces_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6423a76f59437f6e69ae0c484268f350d988813 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xml @@ -0,0 +1,2 @@ + +2 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a0291684d45609f34cb06c752c3b8bf4af98f6a4 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_002/Pos_050101_namespaces_002.xsd @@ -0,0 +1,5 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..237798ceeab046798b389d168e39c73f41aa592e --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that two schemas with the same target namespace are correctly translated + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +module Pos_050101_namespaces_003 { + + import from schema_Pos_050101_namespaces_003 language "XSD" all; + + template MyType m_msg := 3; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_003.xml", { "test_data/Pos_050101_namespaces_003_merged.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..70476acd4f701a4d6340c570e540d068ca49b850 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..038f6ff7bb947b4613026988e43a412f19576191 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ee7a323c52218a3f66e79689ddf553eb087a3627 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/Pos_050101_namespaces_003_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log new file mode 100644 index 0000000000000000000000000000000000000000..52ff94709020080478090765d8cf9408d9851b1e --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/XmlDiff.log @@ -0,0 +1,114 @@ + + + + + 2015-10-05T15:13:38 + 1444047218167 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:101:Reference file: C:\SVN\SVN 475\trunk\ATS\06_built_in_data_types\0601_mapping_of_facets\060101_length\Pos_060101_length_002\Pos_060101_length_002.xml, xsd file names: [Pos_060101_length_002.xsd], xsd search path: null + + + 2015-10-05T15:13:38 + 1444047218326 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 18 + XmlDiff.java:248:Looking for XSD file Pos_060101_length_002.xsd + + + 2015-10-05T15:13:38 + 1444047218327 + 2 + SEVERE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:124:Missing XSD files [Pos_060101_length_002.xsd] in search path null + + + + + + + 2017-04-03T15:17:08 + 1491221828805 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 17 + XmlDiff.java:101:Reference file: C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml, xsd file names: [test_data/Pos_050101_namespaces_003_merged.xsd], xsd search path: null + + + 2017-04-03T15:17:09 + 1491221829023 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 17 + XmlDiff.java:248:Looking for XSD file test_data/Pos_050101_namespaces_003_merged.xsd + + + 2017-04-03T15:17:09 + 1491221829294 + 2 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + diff + 17 + XmlDiff.java:140:Looking for difference: reference file C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml, input {<?xml version="1.0" encoding="utf-8"?> +<ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050101_namespaces_003">3</ns1:MyType>} + + + 2017-04-03T15:17:09 + 1491221829726 + 3 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + diff + 17 + XmlDiff.java:155:No differences found between reference file C:\Work\STF\STF 521\Tmp\05_mapping_xml_schemas\0501_namespaces\050101_namespaces\Pos_050101_namespaces_003\Pos_050101_namespaces_003.xml and input {<?xml version="1.0" encoding="utf-8"?> +<ns1:MyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="schema:Pos_050101_namespaces_003">3</ns1:MyType>} + + + + + + + 2017-04-04T12:33:32 + 1491298412165 + 0 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:101:Reference file: C:\Work\STF\STF 521\Tmp\07_mapping_xsd_components\0707_any_and_anyattribute\070701_the_any_element\Pos_070701_the_any_element_001\Pos_070701_the_any_element_001.xml, xsd file names: [Pos_070701_the_any_element_001.xsd], xsd search path: null + + + 2017-04-04T12:33:32 + 1491298412455 + 1 + FINE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + findXsdFiles + 18 + XmlDiff.java:248:Looking for XSD file Pos_070701_the_any_element_001.xsd + + + 2017-04-04T12:33:32 + 1491298412456 + 2 + SEVERE + org.etsi.mts.ttcn.part9.xmldiff.XmlDiff + <init> + 18 + XmlDiff.java:124:Missing XSD files [Pos_070701_the_any_element_001.xsd] in search path null + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6955c12864372db11e7434f7bb102ca0fdaed9cd --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_003/test_data/Pos_050101_namespaces_003_merged.xsd @@ -0,0 +1,13 @@ + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c705608110058cc2dc045c475946b14f5b7b4019 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.1, Verify that two schemas with no target namespace are correctly translated + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A single XML Schema may be composed of a single or several schema element information +// items, and shall be translated to one or more TTCN-3 modules, corresponding to schema +// components that have the same target namespace. For XSD schemas with the same target +// namespace (including absence of the target namespace) exactly one TTCN-3 module shall +// be generated. +// The names of the TTCN 3 modules generated based on this clause shall be the result of +// applying the name transformation rules in clause 5.2.2 to ... the predefined name +// "NoTargetNamespace". + +module Pos_050101_namespaces_004 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 4; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050101_namespaces_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050101_namespaces_004.xml", { "test_data/Pos_050101_namespaces_004_merged.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050101_namespaces_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa4ad732b33216e9449830f30a265e2885b35cd7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml @@ -0,0 +1,2 @@ + +4 diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..09dc725a033d39ccc0c05d3113ddd3e7872c0330 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1969efeb7c2fa86898aacd1b90c4256c20bca056 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004_1.xsd @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f1099ca389a1df5c3f1195d10a6383428c7891c9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050101_namespaces/Pos_050101_namespaces_004/test_data/Pos_050101_namespaces_004_merged.xsd @@ -0,0 +1,5 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e01153fd83a53db289a4e99c70a5bbe2c8896981 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Test inclusion of a schema with the same namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD include element information items shall be ignored if the included schema element has the same target +// namespace as the including one (implying the absence of the target namespace). + +module Pos_050102_includes_001 { + + import from schema_Pos_050102_includes_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_001.xml", { "Pos_050102_includes_001.xsd", "Pos_050102_includes_001_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..42f7278bdc8240fe066eb5829a95f87d34346174 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..97c302167de98cbb94675d1a62a437db24401752 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8f3fadc4cad184fbf39332c2cd6a05b30b95c861 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_001/Pos_050102_includes_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f5960ea3704836dce3d5e9fb93251e38fb0bd873 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Verify that included schema with no target namespace is transformed twice (inclusion) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the included schema element has no target namespace but the including schema has +// (i.e. it is not absent), all definitions of the included schema shall be mapped twice, +// i.e. the resulted TTCN-3 definitions shall be inserted to the TTCN-3 module generated +// for the schema element(s) with no target namespace as well as to the module generated +// for the schema element(s) with the target namespace of the including schema. + +module Pos_050102_includes_002 { + + import from schema_Pos_050102_includes_002 language "XSD" all; + + template MyType m_msg := 2; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_002.xml", { "Pos_050102_includes_002.xsd", "Pos_050102_includes_002_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..72cd21a5ad9e153bb8559376513c53270aed0f6a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xml @@ -0,0 +1,2 @@ + +2 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8ed2d19b4dd539510d92cfa2f10a8670ff0c45a5 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..97e4e32f1e73c228b2509567fe62e208c682c14b --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_002/Pos_050102_includes_002_1.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ef75b9a89248235ad42d7e473a7b8b9af80c7fb --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.2, Verify that included schema with no target namespace is transformed twice (no namespace) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the included schema element has no target namespace but the including schema has +// (i.e. it is not absent), all definitions of the included schema shall be mapped twice, +// i.e. the resulted TTCN-3 definitions shall be inserted to the TTCN-3 module generated +// for the schema element(s) with no target namespace as well as to the module generated +// for the schema element(s) with the target namespace of the including schema. + +module Pos_050102_includes_003 { + + import from NoTargetNamespace language "XSD" all; + + template MyType m_msg := 3; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050102_includes_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050102_includes_003.xml", { "Pos_050102_includes_003.xsd", "Pos_050102_includes_003_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050102_includes_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..cba20604ecc41f537609bb7282fc291a36eabdbe --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2bdfe5258d6ec72ed482a630479f4534d465ba4d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0d351875f62cbdeb4a34b904d3d8df013e80cf49 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050102_includes/Pos_050102_includes_003/Pos_050102_includes_003_1.xsd @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..623e1aa4f05084c6e6f132ffbd718dfc97def712 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.3, Verify that it is not allowed to import imports from XSD schemas + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// It is not allowed to import XSD import statements to TTCN-3 (i.e. there is no transitive import +// of XSD import statements as defined for TTCN-3, see clause 8.2.3.7 of ES 201 873-1 [1]). + +module Neg_050103_imports_001 { + + import from schema_Neg_050103_imports_001 language "XSD" { import all }; + + template MyType m_msg := 1; + + + + /** + * @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_050103_imports_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_050103_imports_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3a6696577e57d4fe5af9fb1254316780938865ee --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ab84a427cdbb944318a966ddcd091fcd5001daea --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Neg_050103_imports_001/Neg_050103_imports_001_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..54749bf3cd317f512ea8c29a67aa63d072b724a9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.3, Verify that XSD import statement is handled correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All XSD import statements (i.e. import element information items and the related xmlns attributes, +// where present) shall be mapped to equivalent TTCN-3 import statements, importing all definitions +// from the other TTCN-3 module. All XSD components are public by default (see clause 8.2.3 of +// ES 201 873-1 [1]). + +// Note: It is not possible to verify presence of the import clause in the generated code directly +// since XSD import statements cannot be imported. This test only tests if XSD schema containing +// an import element is processed correctly. + +module Pos_050103_imports_001 { + + import from schema_Pos_050103_imports_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050103_imports_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050103_imports_001.xml", { "Pos_050103_imports_001.xsd", "Pos_050103_imports_001_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050103_imports_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..939def1db59d32a554a5ad39b503209299ac4c65 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e07a690eae0b03407aec99af7134a7a9ebace473 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001.xsd @@ -0,0 +1,8 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e3e9d58f5d8c0dab52b0c9a08d54e72937293cb9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050103_imports/Pos_050103_imports_001/Pos_050103_imports_001_1.xsd @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e5b25f2ac6f0a56a25c72a95185962c4c90f3460 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default element form is correctly processed (no namespace prefix) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the ... +// elementFormDefault attributes of any schema element information items that contribute to +// the given TTCN-3 module is qualified, the encoding instructions ... "elementFormQualified" +// shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. + +module Pos_050104_attributes_of_the_xsd_schema_element_001 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_001 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_001.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c18cb49afb3832d61103f2add225321f5ea75990 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..78aa7df5a30e2ca1d42bb18f938610b8e6d7091b --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_001/Pos_050104_attributes_of_the_xsd_schema_element_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ef3e11589c710a223cd85ee29aece3ce93dcc0f --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default element form is correctly processed (namespace prefix used) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the ... +// elementFormDefault attributes of any schema element information items that contribute to +// the given TTCN-3 module is qualified, the encoding instructions ... "elementFormQualified" +// shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_002 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_002 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_002.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..c525cbdda0123f48f83519e31bf5415d2a0a85aa --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a2fd3ee341077202f8b29fa81e2509f4576178cb --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_002/Pos_050104_attributes_of_the_xsd_schema_element_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..879fc698b48fe19b56fa066bc3a5a3fece395451 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that unqualified default element form is correctly processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All fields of TTCN-3 definitions in the given TTCN-3 module corresponding to local +// element declarations or element and model group references in schema element information +// items with the value of its elementFormDefault attribute unqualified (explicitly or +// implicitly via defaulting) shall be supplied with the "form as unqualified" encoding +// instruction, unless a form attribute of the given declaration requires differently +// (see clause 7.1.6). +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_003 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_003 language "XSD" all; + + template MyType m_msg := + { + item1 := "abc", + item2 := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_003.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..71a3812408417a66679f92f8abb6d6bad16444f7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xml @@ -0,0 +1,5 @@ + + + abc + def + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d6b48c0be36407ec3675c8e42e49c2e9a56632e0 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_003/Pos_050104_attributes_of_the_xsd_schema_element_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6bb8a214b42616bc2979bd5a790536916ef0871b --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default attribute form is correctly processed (no namespace prefix) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the +// attributeFormDefault ... attribute of any schema element information items that contribute +// to the given TTCN-3 module is qualified, the encoding instructions "attributeFormQualified" +// ... shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_004 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_004 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_004.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..2adbe415d5c30a906269869eb244bf783aeedb8c --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6542e37297b06740df470e153e7ed34cdae467e4 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_004/Pos_050104_attributes_of_the_xsd_schema_element_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2cbf13ce024038a3fe6c3c0f700894abb83e0a71 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that qualified default attribute form is correctly processed (namespace prefix used) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the TTCN-3 module corresponds to a (present) target namespace and the value of the +// attributeFormDefault ... attribute of any schema element information items that contribute +// to the given TTCN-3 module is qualified, the encoding instructions "attributeFormQualified" +// ... shall be attached accordingly to the given TTCN-3 module. +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_005 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_005 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_005.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..b19190ef97585e8550374d0e82db72e707a855e0 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..24c65a88f19a27c35684202672353310d01b81d5 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_005/Pos_050104_attributes_of_the_xsd_schema_element_005.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..40cc06c9c18736b608874f5f39b506cee05eca9b --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.1.4, Verify that unqualified default attribute form is correctly processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// All fields of TTCN-3 definitions in the given TTCN 3 module corresponding to local +// attribute declarations or to attribute and attributeGroup references in schema element +// information items with the value of its attributeFormDefault attribute being unqualified +//(explicitly or implicitly via defaulting) shall be supplied with the "form as unqualified" +// encoding instruction, unless a form attribute of the given declaration requires +// differently (see clause 7.1.6). +// +// Note: as only end-to-end solution is tested, the presence of encoding attributes is not +// checked directly, but through the encoded messages. +module Pos_050104_attributes_of_the_xsd_schema_element_006 { + + import from schema_Pos_050104_attributes_of_the_xsd_schema_element_006 language "XSD" all; + + template MyType m_msg := + { + item := "abc", + attr := "def" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050104_attributes_of_the_xsd_schema_element_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050104_attributes_of_the_xsd_schema_element_006.xml", { "Pos_050104_attributes_of_the_xsd_schema_element_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050104_attributes_of_the_xsd_schema_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..5385d64e016dd9291dbd0c7bfb698b101ff69620 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6e3894af654a645b1973a3f7218e1823c8c47168 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces/050104_attributes/Pos_050104_attributes_of_the_xsd_schema_element_006/Pos_050104_attributes_of_the_xsd_schema_element_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml b/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa4ad732b33216e9449830f30a265e2885b35cd7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0501_namespaces_and_document_references/050101_namespaces/Pos_050101_namespaces_004/Pos_050101_namespaces_004.xml @@ -0,0 +1,2 @@ + +4 diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..932adf56cb7bada141c0e6e3a2c4f63cadae55f7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify conversion of symbols into U+005f (low line) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule b: +// the characters " " (SPACE), "." (FULL STOP), "-" (HYPEN-MINUS), ":" (COLON) and "/" +// (SOLIDUS) shall all be replaced by a "_" (LOW LINE); +module Pos_050202_name_conversion_rules_001 { + + import from schema_Pos_050202_name_conversion_rules_001_test language "XSD" all; + + template A_b_c m_src := + { + d_e_f := 1, + g_h_i := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_001.xml", { "Pos_050202_name_conversion_rules_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..b988e2aabc8f2345da01141655e3b4f839b02fac --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fabd8a8dae76c059edbe190dc130a7c66bab2e5c --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_001/Pos_050202_name_conversion_rules_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..72e7ea77867f1cc79cd9376353d57faf04f05f28 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that non-ASCI letters are not present in transforming identifiers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// any character except "A" to "Z" (LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z), +// "a" to "z" (LATIN SMALL LETTER A to LATIN SMALL LETTER Z), "0" to "9" (DIGIT ZERO +// to DIGIT NINE), and "_" (LOW LINE) shall be removed; +module Pos_050202_name_conversion_rules_002 { + import from schema_Pos_050202_name_conversion_rules_002 language "XSD" all; + + template Xx m_src := + { + aa := 1, + bb := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_002.xml", { "Pos_050202_name_conversion_rules_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..ba0b7b284d5b5f2172534477d27772cd77242768 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..20003f19134e207aad7447e111d5f40165cb5807 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_002/Pos_050202_name_conversion_rules_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74966b5faee0a155601c185a682a3f84a47eeede --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that multiple "_" are simplified in transforming identifiers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule d: +// a sequence of two or more "_" (LOW LINE) characters shall be replaced with +// a single "_" (LOW LINE); +module Pos_050202_name_conversion_rules_003 { + + import from schema_Pos_050202_name_conversion_rules_003 language "XSD" all; + + template A_b m_src := + { + c_d := 1, + e_f := 2 + }; + template MyType m_msg := m_src; + + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_003.xml", { "Pos_050202_name_conversion_rules_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..f5c4074badbb6ee34d254f93d9d43e0ac41aa9cc --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c4ecd1fece34398fc2f79000cd917d090eec84d4 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_003/Pos_050202_name_conversion_rules_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..216707b6504b7e3ca03997157500233460dae360 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.2, Verify that leading and trailing low lines are removed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule e: +// "_" (LOW LINE) characters occurring at the beginning or at the end of the name shall +// be removed; +module Pos_050202_name_conversion_rules_004 { + + import from schema_Pos_050202_name_conversion_rules_004 language "XSD" all; + + template Abc m_src := + { + def := 1, + ghi := 2 + }; + template MyType m_msg := m_src; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_004.xml", { "Pos_050202_name_conversion_rules_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..8effe763ededf23a7da3f366643cdc1f15a49867 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xml @@ -0,0 +1,4 @@ + + + <__def>1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..de348d0a06c62019602e049fc5feba5913e14e88 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_004/Pos_050202_name_conversion_rules_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c1b571d7ea841794040f83eb54afcfb32ba3e31b --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that type names are capitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule f: +// if a character string that is to be used as a name of a TTCN-3 type starts with +// a lower-case letter, the first letter shall be capitalized (converted to upper-case); +module Pos_050202_name_conversion_rules_005 { + + import from schema_Pos_050202_name_conversion_rules_005 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_005.xml", { "Pos_050202_name_conversion_rules_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..39a88a17b65693fec4083c9a49d0cf2e882184cc --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c7d8f433b3a913be180393c099680e9263ccbeed --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_005/Pos_050202_name_conversion_rules_005.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bfc3d2c30a5373dcaea750d4795af65363199664 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing type names with "X" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule f: +// If [a character string that is to be used as a name of a TTCN-3 type] starts with +// a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "X" (LATIN CAPITAL +// LETTER X) character; +module Pos_050202_name_conversion_rules_006 { + + import from schema_Pos_050202_name_conversion_rules_006 language "XSD" all; + + template X01MyType m_msg := 6; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_006.xml", { "Pos_050202_name_conversion_rules_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1721fded19cbcef079b785b30cc25fcfba86acd --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xml @@ -0,0 +1,2 @@ + +6 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..82534d3582d6afc3c55c39198d7c3e6413cde7ac --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_006/Pos_050202_name_conversion_rules_006.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2aacde87a5346edf31f3203b544fe7e0b0911da2 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that names of field of structure types are uncapitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if a character string that is to be used as an identifier of a structured type field +// ... starts with an upper-case letter, the first letter shall be uncapitalized +// (converted to lower-case); +module Pos_050202_name_conversion_rules_007 { + + import from schema_Pos_050202_name_conversion_rules_007 language "XSD" all; + + template MyType m_msg := + { + abc := 1, + def := 2 + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_007.xml", { "Pos_050202_name_conversion_rules_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..515240aee2f24a6f15cd1ffcb157908ef6beafe8 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..060493571d4cefad0e21585e961d279382c961e9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_007/Pos_050202_name_conversion_rules_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..faec415ccf0e710f6888227cd30a3a3c3478cebf --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that names of enumerated items are uncapitalized + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if a character string that is to be used as an identifier of a structured ... +// enumeration value starts with an upper-case letter, the first letter shall be +// uncapitalized (converted to lower-case); +module Pos_050202_name_conversion_rules_008 { + + import from schema_Pos_050202_name_conversion_rules_008 language "XSD" all; + + template MyType m_msg := indigo; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_008.xml", { "Pos_050202_name_conversion_rules_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f1981ddd95f5452dd8dc6632db1442dc1b8d58a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xml @@ -0,0 +1,2 @@ + +Indigo \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd new file mode 100644 index 0000000000000000000000000000000000000000..13f3d1d63e3669c22c1c996295e22a9291ed4925 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_008/Pos_050202_name_conversion_rules_008.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..523187ef0fb5991e79ab2928f8e111eb95f0d85d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing field names of structured types with "x" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if [a character string that is to be used as an identifier of a structured type field] +// starts with a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "x" +// (LATIN SMALL LETTER X) character; +module Pos_050202_name_conversion_rules_009 { + + import from schema_Pos_050202_name_conversion_rules_009 language "XSD" all; + + template MyType m_msg := + { + x01abc := 1, + x02def := 2 + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_009.xml", { "Pos_050202_name_conversion_rules_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_009(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml new file mode 100644 index 0000000000000000000000000000000000000000..b53d8a9217a56d9de7bd199d18dd3a3d80ccd75a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xml @@ -0,0 +1,4 @@ + + + <中国01abc>1 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd new file mode 100644 index 0000000000000000000000000000000000000000..465afd98503db8ca4e77db4d11e8888a8504db59 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_009/Pos_050202_name_conversion_rules_009.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a55be8c5cbee9405cb8a1b7ee7c6bdbab5c0ef6d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that prefixing enumerated items with "x" works correctly + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule g: +// if [a character string that is to be used as an identifier of an enumerated item] +// starts with a digit (DIGIT ZERO to DIGIT NINE), it shall be prefixed with an "x" +// (LATIN SMALL LETTER X) character; +module Pos_050202_name_conversion_rules_010 { + + import from schema_Pos_050202_name_conversion_rules_010 language "XSD" all; + + template MyType m_msg := x02_orange; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_010.xml", { "Pos_050202_name_conversion_rules_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_010(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml new file mode 100644 index 0000000000000000000000000000000000000000..75e68cd4d4ea2fb7a5c0510ae5b3e9d773a63691 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xml @@ -0,0 +1,2 @@ + +橙色02_orange \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f863d88f116a5350329056820f8841cf2bf22b79 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_010/Pos_050202_name_conversion_rules_010.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5cc2c483143559215ba1f14b7f861f29bf5518c7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty type identifier into "X" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule h: +// if a character string that is to be used as a name of a TTCN-3 type definition or as +// a type reference name is empty, it shall be replaced by "X" (LATIN CAPITAL LETTER X); +module Pos_050202_name_conversion_rules_011 { + + import from schema_Pos_050202_name_conversion_rules_011 language "XSD" all; + + template X m_msg := "世界,你好!"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_011() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_011.xml", { "Pos_050202_name_conversion_rules_011.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_011(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml new file mode 100644 index 0000000000000000000000000000000000000000..95dc86499ba9a1d149edae0c5d132a5bd3471ba8 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xml @@ -0,0 +1,2 @@ + +世界,你好! \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0da0c0c59e886db2e8472d8f452314e77b26dbd0 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_011/Pos_050202_name_conversion_rules_011.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e0a7c4a57ec41f303864faa357f1b520560b008f --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty structured field identifier into "x" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule i: +// if a character string that is to be used a name of a record ... field ... is empty, it +// shall be replaced by "x" (LATIN SMALL LETTER X). +module Pos_050202_name_conversion_rules_012 { + + import from schema_Pos_050202_name_conversion_rules_012 language "XSD" all; + + template MyType m_msg := { x := "孔子" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_012() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_012.xml", { "Pos_050202_name_conversion_rules_012.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_012(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml new file mode 100644 index 0000000000000000000000000000000000000000..ffed47c78356f962059dff32e252f917ce030069 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xml @@ -0,0 +1,4 @@ + + + <名称>孔子 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd new file mode 100644 index 0000000000000000000000000000000000000000..09c563989c6ebed708dfb26853de8daf887dabe7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_012/Pos_050202_name_conversion_rules_012.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..702758d293524029e1662c8de8838066929c4edd --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Check transformation of empty enumerated value into "x" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule i: +// if a character string that is to be used a name of ... [an] enumeration value +// is empty, it shall be replaced by "x" (LATIN SMALL LETTER X). +module Pos_050202_name_conversion_rules_013 { + + import from schema_Pos_050202_name_conversion_rules_013 language "XSD" all; + + template MyType m_msg := x; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_013() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_013.xml", { "Pos_050202_name_conversion_rules_013.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_013(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml new file mode 100644 index 0000000000000000000000000000000000000000..fec2709c9591c167a5974bb1f2e2c2a54fe1fa67 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xml @@ -0,0 +1,2 @@ + +中文 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b4f678919225af1aff54709011d40c885c69f9de --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_013/Pos_050202_name_conversion_rules_013.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20afbfc0737d6f65c21815f16bcfc5cf1aea6772 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that additional suffices are attached in case of name clashes between types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j: +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. 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. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_014 { + + import from schema_Pos_050202_name_conversion_rules_014 language "XSD" all; + + template MyType_2 m_msg := 1.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_014() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_014.xml", { "Pos_050202_name_conversion_rules_014.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_014(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml new file mode 100644 index 0000000000000000000000000000000000000000..0476dc385f7b9f36a344f3224b548fb13962db72 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xml @@ -0,0 +1,2 @@ + +1.0 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bea557b6e0b8cf1959e34143abec1ff73dab410f --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_014/Pos_050202_name_conversion_rules_014.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..68327e05441191d913f6e4f7a1babd50822ad226 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between types and local module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j (adaptation considering rules of 5.2.2 of the core language specification): +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. 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. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_015 { + + import from MyType language "XSD" all; + + template MyType_1 m_msg := 15; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_015() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_015.xml", { "Pos_050202_name_conversion_rules_015.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_015(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml new file mode 100644 index 0000000000000000000000000000000000000000..accea6db4212d2fb3950237df91691c09aa7d13d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xml @@ -0,0 +1,2 @@ + +15 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ad7be898f2590d4c6e4cb10e1a2e9290f6660296 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_015/Pos_050202_name_conversion_rules_015.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..22a115c884eeaa3b06fd198081266402d2463d89 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between types and imported module + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule j (adaptation considering rules of 5.2.2 of the core language specification): +// If the name being generated is the name of a TTCN-3 type and the character string +// generated by items a) to i) above is identical to the name of another TTCN-3 type +// previously generated in the same TTCN-3 module, or is one of the reserved words +// specified in clause 11.27 of Recommendation ITU T X.680 [3], then a postfix shall +// be appended to the character string generated according to the above rules. 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. This +// integer shall be the least positive integer such that the new name is different +// from the type reference name of any other TTCN-3 type assignment previously +// generated in any of those TTCN-3 modules. +module Pos_050202_name_conversion_rules_016 { + + import from schema_Pos_050202_name_conversion_rules_016 language "XSD" all; + + template MyType_1 m_msg := "abc"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_016() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_016.xml", { "Pos_050202_name_conversion_rules_016.xsd", "Pos_050202_name_conversion_rules_016_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_016(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml new file mode 100644 index 0000000000000000000000000000000000000000..3381a461e6b0e91932392e10661344c02f301fba --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6ed81380c8214310581ba4113b184cf98c976a46 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016.xsd @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0e7a0cce84608b43cd0ccdfacf1bd965a12247d6 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_016/Pos_050202_name_conversion_rules_016_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f4cc0ac85a7b60d151b33bb8691b3313caab3016 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field names + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// If the name being generated is the identifier of a field of a record or +// a union type, and the character string generated by the rules in items +// a) to i) above is identical to the identifier of a previously generated +// field identifier of the same type, then a postfix shall be appended to +// the character string generated by the above rules. 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. This integer shall be the least positive integer such that +// the new identifier is different from the identifier of any previously +// generated component of that sequence, set, or choice type. +module Pos_050202_name_conversion_rules_017 { + + import from schema_Pos_050202_name_conversion_rules_017 language "XSD" all; + + template MyType m_msg := + { + item := 0, + item_1 := 1, + item_2 := 2 + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_017() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_017.xml", { "Pos_050202_name_conversion_rules_017.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_017(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f9bb1c689fe40e37baa9a26b15e92af81914dc7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xml @@ -0,0 +1,6 @@ + + + 0 + 1 + 2 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0fef5379dce6f35a65c9d4662e4986461932a6e7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_017/Pos_050202_name_conversion_rules_017.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8bef9cee9ce72e84ef14b3706ad05d0c23b909fc --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field name and keyword + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Field names that are one of the TTCN-3 keywords (see clause A.1.5 of ES 201 873 1 +// [1]) ... after applying the postfix to clashing field names, shall be suffixed by +// a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_018 { + + import from schema_Pos_050202_name_conversion_rules_018 language "XSD" all; + + template MyType m_msg := + { + choice:= { variant_ := 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_018() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_018.xml", { "Pos_050202_name_conversion_rules_018.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_018(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec203e9f641ac49f924d041d5faf53980995af23 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xml @@ -0,0 +1,4 @@ + + + 0 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eb28d7a5dd5e7f2b64107d36a7c68c4dccec2a78 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_018/Pos_050202_name_conversion_rules_018.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c5f8f89016e17e32743d6042f7b31021e257d24 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between field name and predefined function + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Field names that are one of the ... names of predefined functions (see clause 16.1.2 of +// ES 201 873 1 [1]) after applying the postfix to clashing field names, shall be suffixed +// by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_019 { + + import from schema_Pos_050202_name_conversion_rules_019 language "XSD" all; + + template MyType m_msg := + { + choice:= { rnd_ := 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_019() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_019.xml", { "Pos_050202_name_conversion_rules_019.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_019(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml new file mode 100644 index 0000000000000000000000000000000000000000..5031f3e374c9508e54b9bc0b583a9e64d9668082 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xml @@ -0,0 +1,4 @@ + + + 0 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd new file mode 100644 index 0000000000000000000000000000000000000000..317c04232bc1a9681859f2b915801f536e5155b7 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_019/Pos_050202_name_conversion_rules_019.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f15a8708be43959fb9671351cf39ab2aafcdad1a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated items + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule l: +// If the name being generated is the identifier of an enumeration item +// (see clause 6.2.4 of ES 201 873 1 [1]) of an enumerated type, and the +// character string generated by the rules in items a) to i) above is +// identical to the identifier of another enumeration item previously +// generated in the same enumerated type, then a postfix shall be appended +// to the character string generated by the above rules. 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. This integer shall be the least positive integer such that +// the new identifier is different from the identifier in any other +// enumeration item already present in that TTCN-3 enumerated type. +module Pos_050202_name_conversion_rules_020 { + + import from schema_Pos_050202_name_conversion_rules_020 language "XSD" all; + + template MyType m_msg := red_1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_020() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_020.xml", { "Pos_050202_name_conversion_rules_020.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_020(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml new file mode 100644 index 0000000000000000000000000000000000000000..c2b303269e4874cf5157b44d94e6e9e0dcc5c019 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xml @@ -0,0 +1,2 @@ + +红色red \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f6cdbcf8d20bf2055f3813206c2d83023ee13e87 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_020/Pos_050202_name_conversion_rules_020.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f0dc2a1e8f29fb3ca7679bba1337d4bc90e45358 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated item and keyword + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Enumeration names that are one of the TTCN-3 keywords (see clause A.1.5 +// of ES 201 873 1 [1]) ... after applying the postfix to clashing enumeration +// names, shall be suffixed by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_021 { + + import from schema_Pos_050202_name_conversion_rules_021 language "XSD" all; + + template MyType m_msg := on_; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_021() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_021.xml", { "Pos_050202_name_conversion_rules_021.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_021(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b790095aac78b1a1de51c89333f68697d5fdca1 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xml @@ -0,0 +1,2 @@ + +on \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f52b52c355b3f01efbb594ffd751cc41ab73d666 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_021/Pos_050202_name_conversion_rules_021.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..33007261a46f987f1ed3ef4335ac81973d21681c --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.2, Verify that suffix is attached in case of name clash between enumerated item and predefined function + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule k: +// Enumeration names that are one of the ... names of predefined functions +// (see clause 16.1.2 of ES 201 873 1 [1])after applying the postfix to clashing +// enumeration names, shall be suffixed by a single "_" (LOW LINE) character. +module Pos_050202_name_conversion_rules_022 { + + import from schema_Pos_050202_name_conversion_rules_022 language "XSD" all; + + template MyType m_msg := rnd_; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_022() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_022.xml", { "Pos_050202_name_conversion_rules_022.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_022(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml new file mode 100644 index 0000000000000000000000000000000000000000..628c0f4e025515cd6ee7883c433697798c6c7da0 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xml @@ -0,0 +1,2 @@ + +rnd \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd new file mode 100644 index 0000000000000000000000000000000000000000..18d5aa64beecb30559734a94565c51b4a343ddc0 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_022/Pos_050202_name_conversion_rules_022.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..48e0436fda614bd29f3f55ab154a42ea9b980e8d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.2, Verify that name clash between module names is resolved using suffix + ** @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_023 { + + import from schema_Pos_050202_name_conversion_rules_023_ language "XSD" all; + import from schema_Pos_050202_name_conversion_rules_023_1 language "XSD" all; + + template schema_Pos_050202_name_conversion_rules_023_1.MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_023() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_023.xml", { "Pos_050202_name_conversion_rules_023.xsd", "Pos_050202_name_conversion_rules_023_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_023(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml new file mode 100644 index 0000000000000000000000000000000000000000..943f24562bf67c19e3a67d402114cf48af066ee9 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3277fbc528038fbff2b81634766d58822f3943b3 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c434d3693e5f585874a8763cc76d5eb389635607 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_023/Pos_050202_name_conversion_rules_023_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5185dab4bda578ff8aaefacbae8f2660c98a112a --- /dev/null +++ b/xml/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,0 +1,94 @@ +/*************************************************** + ** @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"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_024() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_024.xml", { "Pos_050202_name_conversion_rules_024.xsd", "Pos_050202_name_conversion_rules_024_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_024(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xml new file mode 100644 index 0000000000000000000000000000000000000000..718c21ff9df383bc17c20c233f77a30340b7043c --- /dev/null +++ b/xml/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,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_024/Pos_050202_name_conversion_rules_024.xsd new file mode 100644 index 0000000000000000000000000000000000000000..276e270963fb1870ebc41ba4c99e6c83207c6aef --- /dev/null +++ b/xml/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,0 +1,6 @@ + + + + diff --git a/xml/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 b/xml/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 new file mode 100644 index 0000000000000000000000000000000000000000..6603b3455231764f3d3695108483d1c371be5571 --- /dev/null +++ b/xml/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,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b094fe40e1f376aa71a4833fa6c153c6e370c72e --- /dev/null +++ b/xml/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,0 +1,93 @@ +/*************************************************** + ** @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"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050202_name_conversion_rules_025() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050202_name_conversion_rules_025.xml", { "Pos_050202_name_conversion_rules_025.xsd", "Pos_050202_name_conversion_rules_025_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050202_name_conversion_rules_025(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d0e2a968650dc5494c55c65d1bf2b96830416d7 --- /dev/null +++ b/xml/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,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050202_name_conversion_rules/Pos_050202_name_conversion_rules_025/Pos_050202_name_conversion_rules_025.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b37948d5bc6c76f2a96b6c578df76e1167477cc9 --- /dev/null +++ b/xml/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,0 +1,6 @@ + + + + diff --git a/xml/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 b/xml/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 new file mode 100644 index 0000000000000000000000000000000000000000..e0981c1126707b9fbeb4bbecefbd0013079d0c9f --- /dev/null +++ b/xml/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,0 +1,6 @@ + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dfe727e65d9ced1c58d52cbd393ffa59847ab3ab --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify order of top-level schema components + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule b: +// Within each target namespace, top-level schema components shall be +// divided into four sets ordered as follows: +// 1) element declarations; +// 2) attribute declarations; +// 3) complex type definitions and simple type definitions; +// 4) model group definitions. + +module Pos_050203_order_of_the_mapping_001 { + + import from schema_Pos_050203_order_of_the_mapping_001 language "XSD" all; + + template Item m_msg := "test"; + template Item_1 m_test1 := 5; + template Item_2 m_test2 := 0.1; + template Item_3 m_test3 := { field1 := 0, field2 := 1 }; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_001.xml", { "Pos_050203_order_of_the_mapping_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c623aa07a82ed8db2412fe4ad22753c9e02f371a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..859e0fef7e71a36ce41c00cac4157220ebc0a630 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_001/Pos_050203_order_of_the_mapping_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..63968f3b2e594248b43f7c01e20c3b9819ded69d --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify that alphabetical sorting is based on character ordinal numbers + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// Within each set of item b), schema components shall be ordered by name in +// ascending alphabetical order. +// +// Alphabetical order is defined as follows (3.1): way of sorting the XSD +// names based on the code positions of their characters according to +// ISO/IEC 10646 [i.9] +// +// Note: in UCA alphabetical sorting, the order of elements would be different: +// Ä, ä, Ö +module Pos_050203_order_of_the_mapping_002 { + + import from schema_Pos_050203_order_of_the_mapping_002 language "XSD" all; + + template Type m_msg := 1; + template Type_1 m_test1 := 0.1; + template Type_2 m_test2 := "test"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_002.xml", { "Pos_050203_order_of_the_mapping_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..7708e59129fdd20fea26c71f2f2f124fb0386714 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1a42f7448cd727b42063e8826f370604564ffc8a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_002/Pos_050203_order_of_the_mapping_002.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6cf590fc338f7b99ad5d466df6a8ade432680f60 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5.2.3, Verify that alphabetical sorting is done only inside sets of items + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Rule c: +// Within each set of item b), schema components shall be ordered by name in +// ascending alphabetical order. +// +// Alphabetical order is defined as follows (3.1): way of sorting the XSD +// names based on the code positions of their characters according to +// ISO/IEC 10646 [i.9] +module Pos_050203_order_of_the_mapping_003 { + + import from schema_Pos_050203_order_of_the_mapping_003 language "XSD" all; + + template Item m_msg := 3; + template Item_1 m_item1 := "test"; + template Item_2 m_item2 := 0.1; + template Item_3 m_item3 := true; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_003.xml", { "Pos_050203_order_of_the_mapping_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7ff26faae8d16fee2fd780c43c419f23ff9d247 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xml @@ -0,0 +1,2 @@ + +3 \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b3eccfcebcd5703cddd33725597c4130acce2eb6 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_003/Pos_050203_order_of_the_mapping_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a4664d9833e3c0f5a23411d4e46c2adc227044a --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.3, Asure that namespaces are ordered lexically + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_050203_order_of_the_mapping_004 { + + import from schema_Pos_050203_order_of_the_mapping_004 language "XSD" all; + + template MyType m_msg := {f1 := {a:= 1}, f2 := {a:= 2}} + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_004.xml", { "Pos_050203_order_of_the_mapping_004.xsd", "Pos_050203_order_of_the_mapping_004_1.xsd", "Pos_050203_order_of_the_mapping_004_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa86d9d9b651dd1c495f56e00bf43fad6a2d6490 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xml @@ -0,0 +1,10 @@ + + + + 1 + + + 2 + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..87dee208e665c5f1d12f91f859412297a8442838 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9e30e70f8cee11623234d22ecf88e682d54762a5 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_1.xsd @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1613783ddd978726295b1c878f84c059f03ad4de --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_004/Pos_050203_order_of_the_mapping_004_2.xsd @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..07f2cf0716c8fabbc0d21adacdaa74316e323674 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:5.2.3, Asure that namespaces are ordered lexically + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_050203_order_of_the_mapping_005 { + + import from schema_Pos_050203_order_of_the_mapping_005 language "XSD" all; + + template MyType m_msg := {test1 := 1, test2 := 2}; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_050203_order_of_the_mapping_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_050203_order_of_the_mapping_005.xml", { "Pos_050203_order_of_the_mapping_005.xsd", "Pos_050203_order_of_the_mapping_005_1.xsd", "Pos_050203_order_of_the_mapping_005_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_050203_order_of_the_mapping_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..50ad3aec164cd2c63b151a9fa15d5918ea570864 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xml @@ -0,0 +1,8 @@ + + + 1 + 2 + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..203ec83fbde7826e79af957ad43c8f711de7c794 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..61d9baed483ee5fb2f9d58da54d9f89ba921f1dd --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_1.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8b78ecb7e33182365b019bbc6f064601e32760f3 --- /dev/null +++ b/xml/05_mapping_xml_schemas/0502_name_conversion/050203_order_of_the_mapping/Pos_050203_order_of_the_mapping_005/Pos_050203_order_of_the_mapping_005_2.xsd @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn b/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..447ffb01e5b1d2a4e4170689a38748a2c7ef564b --- /dev/null +++ b/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.ttcn @@ -0,0 +1,51 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:5, Verify that error is generated for missing XSD language tag in import clause + ** @verdict pass reject +***************************************************/ + +// The following requirements are tested: +// When importing from an XSD Schema, the following language identifier string shall be used: "XSD" + +module Neg_05_top_level_001 { + + import from schema_Neg_05_top_level_001 all; + + template MyType m_msg := 1; + + + + /** + * @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_05_top_level_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_05_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd b/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..648c8ee6632276f79aa767398573671037b8f13f --- /dev/null +++ b/xml/05_mapping_xml_schemas/05_top_level/Neg_05_top_level_001/Neg_05_top_level_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a18e6b6219831114b4afed9e1308cde0f49d484f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass reject + ***************************************************/ +module Neg_060101_length_001 { + + import from schema_Neg_060101_length_001 language "XSD" all; + + template E1 m_msg := {"A","B","C","D"}; //length is 3 + + + /** + * @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_060101_length_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_060101_length_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..028ec2f4b3e670a08601f00e019cfe64492c33d8 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Neg_060101_length_001/Neg_060101_length_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..255ad179739e0f40af8a0215fb8cb450688a8a14 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060101_length_001 { + + import from schema_Pos_060101_length_001 language "XSD" all; + + template E1 m_msg := "length_010"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060101_length_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060101_length_001.xml", { "Pos_060101_length_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060101_length_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..605419772611bcddcdbfa6c5748cff60fd04c45f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xml @@ -0,0 +1,4 @@ + +length_010 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b4f74c41dfece9458e470951716ec1254ae63ad7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_001/Pos_060101_length_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74b18169fa387e41c61829205828b1a1d597f6e7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.1, Verify that a length-restricted XSD type shall be mapped to a corresponding length restricted TTCN 3 type. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060101_length_002 { + + import from schema_Pos_060101_length_002 language "XSD" all; + + template E1 m_msg := {"A","B","C"}; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060101_length_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060101_length_002.xml", { "Pos_060101_length_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060101_length_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1f8b6f10a34a1729adc2089f01e7b8041366360 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xml @@ -0,0 +1,4 @@ + +A B C diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6dacadda63844ec9bcb15d1a70c0a66f4777c9c1 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060101_length/Pos_060101_length_002/Pos_060101_length_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e48cb4bc301637e99d4a8e5e0cdda6c42ee9b3f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @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 + + + /** + * @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_060102_minlength_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_060102_minlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ba671af963e84e54b0cd71ec58546cab4a9c2c3a --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Neg_060102_minlength_001/Neg_060102_minlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9976ade74a746872ed7d3a4bd3849f6cbdb38810 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @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"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060102_minlength_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060102_minlength_001.xml", { "Pos_060102_minlength_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060102_minlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..874004ce3ad18b3ea8d0c4c57c80d4d5daab7e8c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4e4ecd0e419e7fffc9706dcc03c53fe5f645fbef --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060102_minlength/Pos_060102_minlength_001/Pos_060102_minlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aeff5f5dd82cba548f52cb3c67dbfe0970306baf --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @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 + + + /** + * @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_060103_maxlength_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_060103_maxlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1ac798745c487b13c342c623e99e4033bee5ca4f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Neg_060103_maxlength_001/Neg_060103_maxlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..43df849839fe7feb54db2eaed088196ba6104574 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @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"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060103_maxlength_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060103_maxlength_001.xml", { "Pos_060103_maxlength_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060103_maxlength_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..4d5224875506f01245523b6f842bf073c414cc7c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1425d82f49d77f4fd87f06e7a151f606a6c8693b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060103_maxlength/Pos_060103_maxlength_001/Pos_060103_maxlength_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c96d54c6ab2a14691f0f172282afb59e3cd47db --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @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 + + + /** + * @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_060104_pattern_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_060104_pattern_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b7d68bb1165b3a70b4cab73fa5d08036204c9835 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Neg_060104_pattern_001/Neg_060104_pattern_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5fdbb16609452b1dca3d8547627a3539570ed9a2 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.4, Verify mapping of the pattern facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060104_pattern_001 { + + import from schema_Pos_060104_pattern_001 language "XSD" all; + + template Test m_msg := "anotherUser@Institute"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060104_pattern_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060104_pattern_001.xml", { "Pos_060104_pattern_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060104_pattern_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..89c27af88a57bac9e1c16c4bd1b516bf0c6cb15f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xml @@ -0,0 +1,3 @@ + +anotherUser@Institute diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..dabd509a7b3dbbc348c9072103daff329f4e093f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060104_pattern/Pos_060104_pattern_001/Pos_060104_pattern_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a2878cfd1442a0f43ae0ee7fe37f1e091159882 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_001 { + + import from schema_Neg_060105_enumeration_001 language "XSD" all; + + template E1 m_msg :=5; + + + + /** + * @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_060105_enumeration_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_060105_enumeration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0c294b9e7d9dcb681f890c3e759fc14475ece5b3 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_001/Neg_060105_enumeration_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7af6b1d57bed494998c05d77d861b63436a2e420 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted enumerated value length due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_002 { + + import from schema_Neg_060105_enumeration_002 language "XSD" all; + + template E1 m_msg := black; // only enumeration elements with 2 to 4 chars are allowed + + + + /** + * @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_060105_enumeration_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_060105_enumeration_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7e9096fab51472736ca54b70508a841d57693546 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_002/Neg_060105_enumeration_002.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bcc399d78a54b6101893f856f9ba60074fb2285e --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_003 { + + import from schema_Neg_060105_enumeration_003 language "XSD" all; + + template E1 m_msg := 1; + + + + /** + * @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_060105_enumeration_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_060105_enumeration_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eaa5ab4cd72ac243e50265c390ba9c010d3e0f50 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_003/Neg_060105_enumeration_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c58671232d59101c1818f201d89b8a9d91273951 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, disallow enumeration values removed by restriction + ** @verdict pass reject + ***************************************************/ +module Neg_060105_enumeration_004 { + + import from schema_Neg_060105_enumeration_004 language "XSD" all; + + template C2 m_msg := uNKNOWN; + + + + /** + * @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_060105_enumeration_004() 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_060105_enumeration_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..837f8bb7c03c38ae3a620481767a349cb8f404a6 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xml @@ -0,0 +1,2 @@ + +UNKNOWN diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3f5efe3ef9f0ef12d853c7d9577fbbd4477c7f57 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Neg_060105_enumeration_004/Neg_060105_enumeration_004.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5a06d4fc6608a9ebe8658b3b0d60d9e16b577ab8 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** string type with an enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_001 { + + import from schema_Pos_060105_enumeration_001 language "XSD" all; + + template E1 m_msg := on_; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_001.xml", { "Pos_060105_enumeration_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..382b3d97dc53d36f2d4d91a942d5511adc7996ba --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xml @@ -0,0 +1,4 @@ + +on diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..17c7def095ec217d41006857b5f571bb33dae201 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_001/Pos_060105_enumeration_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7481b8b9c675e04ce8fa564b8d2dc452e601cfc2 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** integer type with an enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_002 { + + import from schema_Pos_060105_enumeration_002 language "XSD" all; + + template E1 m_msg := int_5; + + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_002.xml", { "Pos_060105_enumeration_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..00f08c1e13e48fd02a478e71a94bce56f2fcd2c7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xml @@ -0,0 +1,4 @@ + +-5 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1e1690db429ed5d5e80eaec4abaa412604be0e5d --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_002/Pos_060105_enumeration_002.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6e65cdacb919139f48500d7baab0ad2567d3f34c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** integer type with a minInclusive and a maxInclusive facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_003 { + + import from schema_Pos_060105_enumeration_003 language "XSD" all; + + template E1 m_msg :=5; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_003.xml", { "Pos_060105_enumeration_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..cc5499e0e68f8241b7cc157afe9c2a97e65a9147 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xml @@ -0,0 +1,4 @@ + +5 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6343c9a0d4a1bb986748af7a604084c532260a1b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_003/Pos_060105_enumeration_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..206af19e59f9f95f65a889f8adb6cbd975d2b9e1 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of + ** another simple type definition, derived by restriction from integer type with + ** the addition of a minInclusive and a maxInclusive facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_004 { + + import from schema_Pos_060105_enumeration_004 language "XSD" all; + + template E1 m_msg := 6; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_004.xml", { "Pos_060105_enumeration_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..09f2b8714e338a98ad6fb4c7723d2874cbdaa90c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xml @@ -0,0 +1,4 @@ + +6 \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d3305c1a3d849743a1b5eb1f6189c215f761b348 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_004/Pos_060105_enumeration_004.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..db8a49a4c415b19962e2012483ff37ea73d19a6b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, Verify mapping of simple type definition that is a restriction of another + ** simple type definition, derived by restriction from string with the addition of an + ** enumeration facet. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_005 { + + import from schema_Pos_060105_enumeration_005 language "XSD" all; + + template E1 m_msg := red; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_005.xml", { "Pos_060105_enumeration_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..677ffafc5362aa2dec4a8cee65a751cfc577fe85 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xml @@ -0,0 +1,4 @@ + +red diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bb03e0ebf2f313bb79c90b37d84f99e5bdb4c980 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_005/Pos_060105_enumeration_005.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..38d4722b740f1bcd88ab8c767330887a71a19bd8 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.5, TODO write purpose + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060105_enumeration_006 { + + import from schema_Pos_060105_enumeration_006 language "XSD" all; + + template C2 m_msg := b2; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060105_enumeration_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060105_enumeration_006.xml", { "Pos_060105_enumeration_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060105_enumeration_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a0f2bc7ccf766eb596662c5423129481f642772 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xml @@ -0,0 +1,2 @@ + +B2 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c14780397922bde729c6fea920821394af7013b5 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060105_enumeration/Pos_060105_enumeration_006/Pos_060105_enumeration_006.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..784207c326a5566916f9988d8151229fcc11eed5 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (preserve option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_001 { + + import from schema_Pos_060106_whitespace_001 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,13) & char(0,0,0,10); + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_001.xml", { "Pos_060106_whitespace_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b42fdb2719de8765292c26f5fb8cfccefd5ec6c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xml @@ -0,0 +1,3 @@ + + abc + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5dce05d05386a540ac7ef6f281b8d0acc820e731 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_001/Pos_060106_whitespace_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23494c3911d83f2345588450d7c8922f882bce35 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (replace option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_002 { + + import from schema_Pos_060106_whitespace_002 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,9) & " def" & char(0,0,0,13) & char(0,0,0,10); + template Test m_rcv := " abc def "; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_002.xml", { "Pos_060106_whitespace_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..55ed699595884d27ead3eaf57d63b918f228c316 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xml @@ -0,0 +1,3 @@ + + abc def + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eb30d146e92a0cd3b792166c11b629962ab39640 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_002/Pos_060106_whitespace_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b958fa2d8a6150fee6b891736141cb9a1f74a327 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.1.6, Verify mapping of the whiteSpace facet (collapse option) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060106_whitespace_003 { + + import from schema_Pos_060106_whitespace_003 language "XSD" all; + + template Test m_msg := " abc" & char(0,0,0,9) & " def" & char(0,0,0,13) & char(0,0,0,10); + template Test m_rcv := "abc def"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060106_whitespace_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060106_whitespace_003.xml", { "Pos_060106_whitespace_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060106_whitespace_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..99e0c51ae76da4b39eefdd84ea4b9b701cc315f7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xml @@ -0,0 +1,3 @@ + + abc def + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c1a8641762b6deb888c7e56158ab727eb46e5dc8 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060106_whitespace/Pos_060106_whitespace_003/Pos_060106_whitespace_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25573a7849754276ad1aee1710d9d369ca956d0c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of an integer element with a minInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_001 { + + import from schema_Pos_060107_mininclusive_001 language "XSD" all; + + template E1 m_msg := -5; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_001.xml", { "Pos_060107_mininclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a908c69fb76391c2ec203d4564c9d7dc95951ab --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xml @@ -0,0 +1,4 @@ + +-5 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d9227843e8df70bfd8425410a5010a57cc13e6ef --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_001/Pos_060107_mininclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a3bf63f2de464fcc629b393f5ef583a17a24e77a --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with a numeric minInclusive value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_002 { + + import from schema_Pos_060107_mininclusive_002 language "XSD" all; + + template E1 m_msg := -5.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_002.xml", { "Pos_060107_mininclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..fdf6e497022be3cab5ca94b00b916c1a23f188aa --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e669ef280bb273291035000e86f7a644a757a7e4 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_002/Pos_060107_mininclusive_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..189c076fd2ba0fe194fae4e2df7194996a710f1f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_003 { + + import from schema_Pos_060107_mininclusive_003 language "XSD" all; + + template E1 m_msg := -5.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_003.xml", { "Pos_060107_mininclusive_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e6aa7c74e2f7807ffe7c6ada7ead32a54406449 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..00e42dff11e93079cbbc3846a4c72648301fca82 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_003/Pos_060107_mininclusive_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ba9149eb9a82326203d87cc8821ce68fc8eb0b8b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_004 { + + import from schema_Pos_060107_mininclusive_004 language "XSD" all; + + template E1 m_msg := infinity; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_004.xml", { "Pos_060107_mininclusive_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..c39e8d458388df51d895f9f76f1f7caaea7cf8bd --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xml @@ -0,0 +1,4 @@ + +INF diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c03f6a6628b322108719cbb7a1e1ed4e005ced82 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_004/Pos_060107_mininclusive_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4200c273facbbcf97553cc45086e5383d2dcd5c5 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.7, Verify mapping of a float element with special minInclusive values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060107_mininclusive_005 { + + import from schema_Pos_060107_mininclusive_005 language "XSD" all; + + template E1 m_msg := not_a_number; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060107_mininclusive_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060107_mininclusive_005.xml", { "Pos_060107_mininclusive_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060107_mininclusive_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..debd861f6c2a1d2a7a1a25cfade22710915d18bf --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xml @@ -0,0 +1,4 @@ + +NaN diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5575d19aae203aa757741134bda22da12f9e3fbe --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060107_mininclusive/Pos_060107_mininclusive_005/Pos_060107_mininclusive_005.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fd5e7d5274095058e82316fb964ce66afc93b45f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of elements of type integer with maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_001 { + + import from schema_Pos_060108_maxinclusive_001 language "XSD" all; + + template E1 m_msg := 100; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_001.xml", { "Pos_060108_maxinclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..542a3eb2551008b88aa902251e7a0a7e9117694b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xml @@ -0,0 +1,4 @@ + +100 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f12417892752ae6c001bf878639a51e1d6658097 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..10ca329c0bd74cf7c5c31fdc33630f9f1e17a40a --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_002 { +//Float possible values from http://www.w3.org/TR/xmlschema-2/#float for xsd file : -1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF are all legal literals for float + import from schema_Pos_060108_maxinclusive_002 language "XSD" all; + + template E1 m_msg := -5.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_002.xml", { "Pos_060108_maxinclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ef36f10525db3cda34a5b5a74e5d18bde2edc5e --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2d042a7676a0d42102bfea04c27a5b1b573c5274 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_002/Pos_060108_maxinclusive_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0290be46e3f97da99b2b6b935e4265fe5482d5f5 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_003 { + + import from schema_Pos_060108_maxinclusive_003 language "XSD" all; + + template E1 m_msg := 5.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_003.xml", { "Pos_060108_maxinclusive_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b1080b01d0f8da0833bff0b3b02114753edd70c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xml @@ -0,0 +1,4 @@ + +5.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..15b4b66e18715de3d558ffd1d0d7a37d58f6d912 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_003/Pos_060108_maxinclusive_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a14f64f4a391ca335e93629f93f266e76fb7eb44 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.8, Verify mapping of a float type with a numeric maxInclusive facet + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060108_maxinclusive_004 { + + import from schema_Pos_060108_maxinclusive_004 language "XSD" all; + + template E1 m_msg := not_a_number; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060108_maxinclusive_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060108_maxinclusive_004.xml", { "Pos_060108_maxinclusive_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060108_maxinclusive_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..47e0a76fdaec24564415735a0318fe995f22a883 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xml @@ -0,0 +1,4 @@ + +NaN diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2d61407fa5b83955051963b053e9323cff79fb8f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060108_maxinclusive/Pos_060108_maxinclusive_004/Pos_060108_maxinclusive_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a4fbfce67715744d5fbfaaec28a98bfd310a869a --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060109_minexclusive_001 { + + import from schema_Neg_060109_minexclusive_001 language "XSD" all; + + template E1 m_msg := 2; // valid values 6..10 + + + + /** + * @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_060109_minexclusive_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_060109_minexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0ad2219b0541245981526076d19be0a0a03585f2 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_001/Neg_060109_minexclusive_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f2ee8eee4eca4e743cf5412239bf285c3cd2962e --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool rejects validation in case of restricted value due xsd type declaration. + ** @verdict pass reject + ***************************************************/ +module Neg_060109_minexclusive_002 { + + import from schema_Neg_060109_minexclusive_002 language "XSD" all; + + template E1 m_msg := 5; // valid values 6..10 + + + + /** + * @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_060109_minexclusive_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_060109_minexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..850b6ebcdb25055b24197c7fd88220d16a95f10d --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Neg_060109_minexclusive_002/Neg_060109_minexclusive_002.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..61751975f448c92ab9e9788403a68fae932a5168 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool accepts values restricted by xsd type declaration. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060109_minexclusive_001 { + + import from schema_Pos_060109_minexclusive_001 language "XSD" all; + + template E1 m_msg := 6; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060109_minexclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060109_minexclusive_001.xml", { "Pos_060109_minexclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060109_minexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..31abf3df8fa42dfcb34950b68950b99e0d6a1caf --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xml @@ -0,0 +1,4 @@ + +6 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bb1ef478f3aed3e9964c83a0bd40c41ec43049f4 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_001/Pos_060109_minexclusive_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa63125bd4034001dfdf0b1067ff510623363920 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.9, Verify if tool accepts values restricted by xsd type declaration. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060109_minexclusive_002 { + + import from schema_Pos_060109_minexclusive_002 language "XSD" all; + + template E1 m_msg := 7; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060109_minexclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060109_minexclusive_002.xml", { "Pos_060109_minexclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060109_minexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..63d10d37c47356f8aa5b045b81f44ddec0a4cd8d --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xml @@ -0,0 +1,2 @@ + +7 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ff5c876299313936c6c6911bddd7db7b286ba6a0 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060109_minexclusive/Pos_060109_minexclusive_002/Pos_060109_minexclusive_002.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0192d09c948ed31b53b23386ad6eafe930c1d2d7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.ttcn @@ -0,0 +1,44 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify that INF (negative infinity) or NaN (not-a-number), this type shall not be translated to TTCN-3 + ** @verdict pass reject + ***************************************************/ +module Neg_060110_maxexclusive_001 { + + import from schema_Neg_060110_maxexclusive_001 language "XSD" all; + + + + /** + * @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_060110_maxexclusive_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_060110_maxexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6a24cbd5642caaac013cae22e3d0dfc3659dd269 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Neg_060110_maxexclusive_001/Neg_060110_maxexclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..963aff1b015572aeea749ed58c6c9eb1ce365793 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to a type, which is derivative of integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_001 { + + import from schema_Pos_060110_maxexclusive_001 language "XSD" all; + + template E1 m_msg := 99; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_001.xml", { "Pos_060110_maxexclusive_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7bb3df3cadce50523c016b6b36311e0d1296414 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xml @@ -0,0 +1,4 @@ + +99 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c4b1b881cbd58af0e4b1f53bb17de23f7c979a1c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_001/Pos_060110_maxexclusive_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7c38e5a4f4597d61e16dd714464fbf91129d404f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to the float type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_002 { + + import from schema_Pos_060110_maxexclusive_002 language "XSD" all; + + template E1 m_msg := -6.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_002.xml", { "Pos_060110_maxexclusive_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..faed9a0e30ed2630685638c085991d2e35f68b3b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xml @@ -0,0 +1,4 @@ + +-6.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a0e553d0f3a401f7421562e317e9a1d687e102cd --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_002/Pos_060110_maxexclusive_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e21014478b2af1c73e409c22ae05a1c690383bbc --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.1.10, Verify mapping of a maxExclusive facet applied to the float type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060110_maxexclusive_003 { + + import from schema_Pos_060110_maxexclusive_003 language "XSD" all; + + template E1 m_msg := -4.1; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060110_maxexclusive_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060110_maxexclusive_003.xml", { "Pos_060110_maxexclusive_003.xsd", "Pos_060110_maxexclusive_003_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060110_maxexclusive_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..1847ed8e18f1597276ae621575c36dea54873678 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xml @@ -0,0 +1,4 @@ + +-4.1 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4edc8ff2a4e243ad5f766881f3cdce7561dfc576 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..be6262082103b3f1fca12d8429eac1d3187eb310 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060110_maxexclusive/Pos_060110_maxexclusive_003/Pos_060110_maxexclusive_003_1.xsd @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b0c3bbd2ad3d6047ab1d8c2dd765a2bffd9f2a7f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_001 { + + import from schema_Neg_060111_total_digits_001 language "XSD" all; + + template E1 m_msg := 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_060111_total_digits_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_060111_total_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7ae042aedbfdcbd55e1a34adcb2f7dd22bc633a1 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_001/Neg_060111_total_digits_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a4dd272c9905da8f5214949c29bbc2f51476a461 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_002 { + + import from schema_Neg_060111_total_digits_002 language "XSD" all; + + template E1 m_msg := -1000; + + + + /** + * @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_060111_total_digits_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_060111_total_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d13aa2085025f45480d2a3f64963ae9d3a3d932f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_002/Neg_060111_total_digits_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c963838e024bf0813867b8d58a06a4eff49b829 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_003 { + + import from schema_Neg_060111_total_digits_003 language "XSD" all; + + template E1 m_msg := -100000.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_060111_total_digits_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_060111_total_digits_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..36edee24fe510b9d28bd49742e6795d5a887aee9 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_003/Neg_060111_total_digits_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dedde247626a33f5f370f5644a1c2760448616b7 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass reject + ***************************************************/ +module Neg_060111_total_digits_004 { + + import from schema_Neg_060111_total_digits_004 language "XSD" all; + + template E1 m_msg := 999999.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_060111_total_digits_004() 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_060111_total_digits_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c3a6d9eee06f8a40f865e2f7c6c695d199323515 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Neg_060111_total_digits_004/Neg_060111_total_digits_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f10204694efc4c4a3156a9ae414e74af447285f3 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_001 { + + import from schema_Pos_060111_total_digits_001 language "XSD" all; + + template E1 m_msg := -999; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_001.xml", { "Pos_060111_total_digits_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c1ebfcdc76d4552b56ff00c9a165ac39bf0228de --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xml @@ -0,0 +1,2 @@ + +-999 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8bbf1486bb601cca32fb8cf22c0a41ec0e04c476 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_001/Pos_060111_total_digits_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0e810272a870f5347440d13161ac2b7d012a5ebe --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_002 { + + import from schema_Pos_060111_total_digits_002 language "XSD" all; + + template E1 m_msg := -1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_002.xml", { "Pos_060111_total_digits_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f02727895821cb55b643d161313806829286196d --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xml @@ -0,0 +1,2 @@ + +-1 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..618b2d54bf068f02b000555bc5f112898715ce3c --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_002/Pos_060111_total_digits_002.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c174be15de813e36a521edeefff1b91411ed22cc --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_003 { + + import from schema_Pos_060111_total_digits_003 language "XSD" all; + + template E1 m_msg := 9999.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_003.xml", { "Pos_060111_total_digits_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..9a5643575ab36309494ad67dcad977a4c0bc91a5 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xml @@ -0,0 +1,2 @@ + +9999.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ce25f7141c50382e4822cb18d414ed810c46c270 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_003/Pos_060111_total_digits_003.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..03e1d3cb9a88c61668d0f4475ecf22a3bd94242b --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_004 { + + import from schema_Pos_060111_total_digits_004 language "XSD" all; + + template E1 m_msg := -9999.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_004.xml", { "Pos_060111_total_digits_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9a758f26fe15d6de8f1fe67ef9e36494d19b834 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xml @@ -0,0 +1,2 @@ + +-9999.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..68c7e29cec382363ad45138a69f013d4b2462a83 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_004/Pos_060111_total_digits_004.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa7d7d86e40e8eed8a30047274d11b733a548d80 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.11, Check that totalDigits are converted to value boundaries + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060111_total_digits_005 { + + import from schema_Pos_060111_total_digits_005 language "XSD" all; + + template E1 m_msg := 0.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060111_total_digits_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060111_total_digits_005.xml", { "Pos_060111_total_digits_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060111_total_digits_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ecad680d15dcd96b7e927cbde62008feecf13fb --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xml @@ -0,0 +1,2 @@ + +0.0 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2e2a5a81f3c18f779bfb78cb1a54c8ddd845b024 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060111_total_digits/Pos_060111_total_digits_005/Pos_060111_total_digits_005.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ce234cf76d8ee739641172ef6c97542106655514 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.12, Check that floats having same accuracy as fractionDigits are converted correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060112_fraction_digits_001 { + + import from schema_Pos_060112_fraction_digits_001 language "XSD" all; + + template ActualTemp m_msg := 99.9; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060112_fraction_digits_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060112_fraction_digits_001.xml", { "Pos_060112_fraction_digits_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060112_fraction_digits_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c82c9d5f313a6379a0c3d32bf26b2534bf7073e6 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xml @@ -0,0 +1,2 @@ + +99.9 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c434c67d22ea30454ef9d627c3dd4deb1fbad3bb --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_001/Pos_060112_fraction_digits_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..77c5018406d658651513cfb742c0c744347acea9 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:6.1.12, Check that floats having higher accuracy than fractionDigits are converted correct + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060112_fraction_digits_002 { + + import from schema_Pos_060112_fraction_digits_002 language "XSD" all; + + template ActualTemp m_msg := 9.999E1; + template ActualTemp m_rcv := 99.9; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060112_fraction_digits_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060112_fraction_digits_002.xml", { "Pos_060112_fraction_digits_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060112_fraction_digits_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ad201ba30e666ab4cc58bce1d4bf8a9808dfe40 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xml @@ -0,0 +1,2 @@ + +99.9 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2a6e7ae4a91bca80ea4765c6892d7749ec53433a --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060112_fraction_digits/Pos_060112_fraction_digits_002/Pos_060112_fraction_digits_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fa75a8a2b7800c4f9fe26b5b01977f8bf4c4473f --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 487 + ** @version 0.0.1 + ** @purpose 9:6.1.13, Handle not mapped facets to transparent + ** @verdict pass accept, ttcn3verdict:pass + **************◊*************************************/ +module Pos_060113_not_mapped_001 { + + import from schema_Pos_060113_not_mapped_001 language "XSD" all; + + template DecimalWithWhole m_msg := 1.3; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060113_not_mapped_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060113_not_mapped_001.xml", { "Pos_060113_not_mapped_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060113_not_mapped_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..1954afdecac56a5ff8a266fdc0f5422b0cfbd194 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xml @@ -0,0 +1,2 @@ + +1.3 diff --git a/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d396e7e9ea1990480a6ce4d13e2c10e12d7978c0 --- /dev/null +++ b/xml/06_built_in_data_types/0601_mapping_of_facets/060113_not_mapped/Pos_060113_not_mapped_001/Pos_060113_not_mapped_001.xsd @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e23aed078766eb888880f3abc2d7125d51e82ef7 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Verify mapping of a string type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060201_string_001 { + + import from schema_Pos_060201_string_001 language "XSD" all; + + template E1 m_msg := "string"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060201_string_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060201_string_001.xml", { "Pos_060201_string_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060201_string_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5db63fed90e6ecc4537373f08f3446b884db49c --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xml @@ -0,0 +1,4 @@ + +string diff --git a/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4de726b84cc69a344ce31b1b74798fe17699f0f1 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060201_string/Pos_060201_string_001/Pos_060201_string_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e6a0a9f04b1c21b3ee3e79ea7650671b2784974f --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.2, Verify mapping of a normalizedString type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060202_normalized_string_001 { + + import from schema_Pos_060202_normalized_string_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060202_normalized_string_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060202_normalized_string_001.xml", { "Pos_060202_normalized_string_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060202_normalized_string_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..eee868e0271db9d469272514c13fc34b69b18646 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9d035d35c9b041e46c7ad50c8917b5c74d163fd4 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060202_normalized_string/Pos_060202_normalized_string_001/Pos_060202_normalized_string_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..077099387318a83f2bba9bf5c38de26bb6497337 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.3, Verify mapping of a token type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060203_token_001 { + + import from schema_Pos_060203_token_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060203_token_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060203_token_001.xml", { "Pos_060203_token_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060203_token_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..1b1b0da6f22c3e8f1ce8a9a34d603ca10181da0d --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..85c0392ed3d80465a7e989f5f4e0477abbabc74b --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060203_token/Pos_060203_token_001/Pos_060203_token_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1dc7234f1ea4475c55e6505c5e0b91dd12e4dadc --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.4, Verify mapping of a Name type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060204_name_001 { + + import from schema_Pos_060204_name_001 language "XSD" all; + + template E1 m_msg := "Name"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060204_name_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060204_name_001.xml", { "Pos_060204_name_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060204_name_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..71652e077dec71f7e448a80b7a341938807b6997 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xml @@ -0,0 +1,4 @@ + +Name diff --git a/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..aead2f3dad7ca4692ce2bc6aed0d8a2fb03cb98d --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060204_name/Pos_060204_name_001/Pos_060204_name_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5d1d64bfebe0b7bd7f433f69bc7ed2bd15dae317 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.5, Verify mapping of a NMTOKEN type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060205_nmtoken_001 { + + import from schema_Pos_060205_nmtoken_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060205_nmtoken_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060205_nmtoken_001.xml", { "Pos_060205_nmtoken_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060205_nmtoken_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..b39872773e8810da1c02dd3b5f515f36d135b30c --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b95100d5d19f5d138b5c541b3bc0c5ce220f8813 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060205_nmtoken/Pos_060205_nmtoken_001/Pos_060205_nmtoken_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0980a470263644df609eeb2738cb1a59b93c314d --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.6, Verify mapping of a NCName type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060206_ncname_001 { + + import from schema_Pos_060206_ncname_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060206_ncname_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060206_ncname_001.xml", { "Pos_060206_ncname_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060206_ncname_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d64d57c105b1bf01ab971bee663e5862572e8e59 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2537d333cd1bbc488435effd8790e18437b5c712 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060206_ncname/Pos_060206_ncname_001/Pos_060206_ncname_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9aafde039184309e138565f9aa451f9fd894b1e3 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.7, Verify mapping of an ID type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060207_id_001 { + + import from schema_Pos_060207_id_001 language "XSD" all; + + template Test m_msg := "abc"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060207_id_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060207_id_001.xml", { "Pos_060207_id_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060207_id_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d3448a8b23708ee33fcdc5e74803432fa899dd3 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xml @@ -0,0 +1,3 @@ + +abc diff --git a/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e7685a8e28879235754b07df28725e86aa5443c1 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060207_id/Pos_060207_id_001/Pos_060207_id_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28b40bf01876557c95e69db7eadf02b5123f0a64 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.8, Verify mapping of an IDREF type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060208_idref_001 { + + import from schema_Pos_060208_idref_001 language "XSD" all; + + template Test m_msg := { + item := "abc", + itemref := "abc" + } + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060208_idref_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060208_idref_001.xml", { "Pos_060208_idref_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060208_idref_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ac7d283bc5ce572030fa9a4543d847786a17154 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xml @@ -0,0 +1,6 @@ + + + abc + abc + diff --git a/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..86352bb05a8cc0c20cffd0f5c2c371e89d337ada --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060208_idref/Pos_060207_idref_001/Pos_060208_idref_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..54dfc2e7d16782d72836c7f7242174cb5d2d6ff6 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.10, Verify mapping of the hexBinary type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060210_hexadecimal_binary_001 { + + import from schema_Pos_060210_hexadecimal_binary_001 language "XSD" all; + + template Test m_msg := '0123456789ABCDEF'O; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060210_hexadecimal_binary_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060210_hexadecimal_binary_001.xml", { "Pos_060210_hexadecimal_binary_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060210_hexadecimal_binary_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..139f9b89e1b4ddd9cc4905a0df42ed7a8f9f25bd --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xml @@ -0,0 +1,3 @@ + +0123456789ABCDEF diff --git a/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1cb281f220ccfe273c6bcc55911383699746b5a7 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060210_hexadecimal_binary/Pos_060210_hexadecimal_binary_001/Pos_060210_hexadecimal_binary_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c50a68aeeecd0065cc13ab885c722f728f84dae --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.11, Verify mapping of the base64Binary type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060211_base_64_binary_001 { + + import from schema_Pos_060211_base_64_binary_001 language "XSD" all; + + template Test m_msg := '4A6F686E20536D697468'O; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060211_base_64_binary_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060211_base_64_binary_001.xml", { "Pos_060211_base_64_binary_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060211_base_64_binary_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..f6488705024949bdd11116f80b28b107264ef5ca --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xml @@ -0,0 +1,3 @@ + +Sm9obiBTbWl0aA== diff --git a/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9b53aa41660460e6cd3d1a94fa105a9a9c1f7df7 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060211_base_64_binary/Pos_060211_base_64_binary_001/Pos_060211_base_64_binary_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..87719d574891b2607c672ebe780bacba553b1fac --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass reject + ***************************************************/ +module Neg_060212_any_uri_001 { + + import from schema_Neg_060212_any_uri_001 language "XSD" all; + + template E1 m_msg := "http://etsi.org" & char(0,0,0,13) & char(0,0,0,10) & char (0,0,0,9);//String with no CRLFHT + + + + /** + * @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_060212_any_uri_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_060212_any_uri_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..148a0739804c654dc7fe6f43224167a6b7e2e023 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_001/Neg_060212_any_uri_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..153a06298c4139e12cca34897367feb2bbcaa896 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass reject + ***************************************************/ +module Neg_060212_any_uri_002 { + + import from schema_Neg_060212_any_uri_002 language "XSD" all; + + template E1 m_msg := "http://etsi.org ";//String with no HT - Horizontal TAB + + + + /** + * @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_060212_any_uri_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_060212_any_uri_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..86bedd75fb0db3ac098487e0ce1cb000f8412390 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Neg_060212_any_uri_002/Neg_060212_any_uri_002.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0b0542452e0e6f951fa7d9ebb81d4bd102c7e823 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.2.12, Verify mapping of an anyURI type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060212_any_uri_001 { + + import from schema_Pos_060212_any_uri_001 language "XSD" all; + + template E1 m_msg := "http://etsi.org"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060212_any_uri_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060212_any_uri_001.xml", { "Pos_060212_any_uri_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060212_any_uri_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0f1e3322776f11914e8f22c9a1fac28f46607b03 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xml @@ -0,0 +1,4 @@ + +http://etsi.org diff --git a/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8cfda37324b0396ad7869d896f8f8c4efd95bd43 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060212_any_uri/Pos_060212_any_uri_001/Pos_060212_any_uri_001.xsd @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6e30648d08c8239499e4928bb8978d9de2f25b69 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.13, Verify mapping of the language type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060213_language_001 { + + import from schema_Pos_060213_language_001 language "XSD" all; + + template Test m_msg := "en-GB"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060213_language_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060213_language_001.xml", { "Pos_060213_language_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060213_language_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d76d23ad11fe9bc0680b320f1ce8203a76622080 --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xml @@ -0,0 +1,3 @@ + +en-GB diff --git a/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3a22b71f8e067d22ddf30a1e1a32a7bbd3bc484d --- /dev/null +++ b/xml/06_built_in_data_types/0602_string_types/060213_language/Pos_060213_language_001/Pos_060213_language_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3425bcd806b8452525cbdf64d9dd48f2acde166a --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.1, Verify that the integer type shall be translated to TTCN-3 as a plain integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060301_integer_001 { + + import from schema_Pos_060301_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060301_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060301_integer_001.xml", { "Pos_060301_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060301_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..46ec61745085e3aa5b47bab937ec8810be64932d --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..610494f22fb3bda1eeca4a43c2a6f323da2f618b --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060301_integer/Pos_060301_integer_001/Pos_060301_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ef5bb32988c564f7fc154e5ef54dea600cf085e7 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.2, Verify that the integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060302_positive_integer_001 { + + import from schema_Pos_060302_positive_integer_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060302_positive_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060302_positive_integer_001.xml", { "Pos_060302_positive_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060302_positive_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..3e369e84bfb6c6e90f27f77137aca5aae5b91437 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7a621038de3ecd18f4d94e298f15bf3c9c885567 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060302_positive_integer/Pos_060302_positive_integer_001/Pos_060302_positive_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..30bd4a24c7a0df13b940d7643548855d63d79936 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.3, Verify that the non positive integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060303_non_positive_integer_001 { + + import from schema_Pos_060303_non_positive_integer_001 language "XSD" all; + + template E1 m_msg := -2147483648; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060303_non_positive_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060303_non_positive_integer_001.xml", { "Pos_060303_non_positive_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060303_non_positive_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..75cc85970feba714babc6aff7effde3393f71470 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xml @@ -0,0 +1,4 @@ + +-2147483648 diff --git a/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d2d13adc4c4aea5eb17950e50ecca893126fcfc6 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060303_non_positive_integer/Pos_060303_non_positive_integer_001/Pos_060303_non_positive_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28ecf28e2671ef50f10900aa501a2d52398e3568 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.4, Verify that the negative integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060304_negative_integer_001 { + + import from schema_Pos_060304_negative_integer_001 language "XSD" all; + + template E1 m_msg := -1; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060304_negative_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060304_negative_integer_001.xml", { "Pos_060304_negative_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060304_negative_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..1101831ff6c9b6418fd51476fa49121d9f00d890 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xml @@ -0,0 +1,4 @@ + +-1 diff --git a/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..48c8755522fdf5ebf65a7d84d40e70fec0e84f89 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060304_negative_integer/Pos_060304_negative_integer_001/Pos_060304_negative_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ce7fde310ebb41f88e9d2744b0962995832090ea --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.5, Verify that the non negative integer type shall be translated to TTCN-3 as the range-restricted integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060305_non_negative_integer_001 { + + import from schema_Pos_060305_non_negative_integer_001 language "XSD" all; + + template E1 m_msg := 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060305_non_negative_integer_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060305_non_negative_integer_001.xml", { "Pos_060305_non_negative_integer_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060305_non_negative_integer_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d94995050e067a49333c8c5be0b4442bb95cb388 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xml @@ -0,0 +1,4 @@ + +0 diff --git a/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..dd66dd27d978ae3db1f17c5218014a738d1f2f8f --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060305_non_negative_integer/Pos_060305_non_negative_integer_001/Pos_060305_non_negative_integer_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7e0744f473ce1d254de6466ffbd78b9229347f4 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.6, Verify that long type (64bit) shall be translated to TTCN-3 as a plain long long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060306_long_001 { + + import from schema_Pos_060306_long_001 language "XSD" all; + + template E1 m_msg := 9223372036854775807; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060306_long_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060306_long_001.xml", { "Pos_060306_long_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060306_long_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..f332aebba49be70b55df1e54275b0d2b4f4e5280 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xml @@ -0,0 +1,4 @@ + +9223372036854775807 diff --git a/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..51aaf45f7e05b00d9927c7a23c4239244341953e --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060306_long/Pos_060306_long_001/Pos_060306_long_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e41d7d29afb4c4bf73539caeb08a8197c02e1b98 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.7, Verify that unsigned long type (64bit) shall be translated to TTCN-3 as a plain unsigned long long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060307_unsigned_long_001 { + + import from schema_Pos_060307_unsigned_long_001 language "XSD" all; + + template E1 m_msg := 18446744073709551615; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060307_unsigned_long_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060307_unsigned_long_001.xml", { "Pos_060307_unsigned_long_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060307_unsigned_long_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..41ab65ade60795ee5058a96fee43f278d51fc8b8 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xml @@ -0,0 +1,4 @@ + +18446744073709551615 diff --git a/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6d806abe3814dc75c05275dce92f74aa85762acd --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060307_unsigned_long/Pos_060307_unsigned_long_001/Pos_060307_unsigned_long_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2551c390c689454561456864c4dadd71b411b106 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.8, Verify that int type (32bit) shall be translated to TTCN-3 as a plain long as defined in clause D.2.1.2 of ES 201 873 1 [1]) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060308_int_001 { + + import from schema_Pos_060308_int_001 language "XSD" all; + + template E1 m_msg := 2147483647; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060308_int_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060308_int_001.xml", { "Pos_060308_int_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060308_int_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..f975ae1f2ea493a5dc6222c43c8b2ac729744684 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xml @@ -0,0 +1,4 @@ + +2147483647 diff --git a/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4e6ad8dd928264605aeec62f30d753d98a7449a1 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060308_int/Pos_060308_int_001/Pos_060308_int_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa82a225a57f60398b266540ec603dbe7804226c --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.9, Verify that unsigned int type (32bit) shall be translated to TTCN-3 as a plain unsignedlong as defined in clause D.2.1.2 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060309_unsigned_int_001 { + + import from schema_Pos_060309_unsigned_int_001 language "XSD" all; + + template E1 m_msg := 4294967295; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060309_unsigned_int_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060309_unsigned_int_001.xml", { "Pos_060309_unsigned_int_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060309_unsigned_int_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..a58bdaa48b85222aeeb65233aaae9656b4ce6208 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xml @@ -0,0 +1,4 @@ + +4294967295 diff --git a/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..afaa1eed1c1d293bffe0c2ac202369d73b194be3 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060309_unsigned_int/Pos_060309_unsigned_int_001/Pos_060309_unsigned_int_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..30e509ab296a260a8aa1c6eec37674ba9f4460a2 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.10, Verify that short type (16bit) shall be translated to TTCN-3 as a plain short as defined in clause D.2.1.1 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060310_short_001 { + + import from schema_Pos_060310_short_001 language "XSD" all; + + template E1 m_msg := 32767; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060310_short_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060310_short_001.xml", { "Pos_060310_short_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060310_short_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..af3c37d42dab5f8841b93c7da088ec330be3ba92 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xml @@ -0,0 +1,4 @@ + +32767 diff --git a/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..56d280d70d2e3a6d70b73fa9964dbb2a6a1e7075 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060310_short/Pos_060310_short_001/Pos_060310_short_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0992cdf6439652048b05dd31957113d73a51b541 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.11, Verify that unsigned short type (16bit) shall be translated to TTCN-3 as a plain unsigned short as defined in clause D.2.1.1 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060311_unsigned_short_001 { + + import from schema_Pos_060311_unsigned_short_001 language "XSD" all; + + template E1 m_msg := 65535; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060311_unsigned_short_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060311_unsigned_short_001.xml", { "Pos_060311_unsigned_short_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060311_unsigned_short_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..fcdedfb613e36264653439524096ea01aac46165 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xml @@ -0,0 +1,4 @@ + +65535 diff --git a/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7f62f2251581343e963db517541ce3ca75857d66 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060311_unsigned_short/Pos_060311_unsigned_short_001/Pos_060311_unsigned_short_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28870f5441d40d27501b6199142af3bf21580dda --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.12, Verify that byte type (8bit) shall be translated to TTCN-3 as a plain byte as defined in clause D.2.1.0 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060312_byte_001 { + + import from schema_Pos_060312_byte_001 language "XSD" all; + + template E1 m_msg := 127; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060312_byte_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060312_byte_001.xml", { "Pos_060312_byte_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060312_byte_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8323d610be0b03117b0f30e177ee09b6bd9fc015 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xml @@ -0,0 +1,4 @@ + +127 diff --git a/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c19a7fdc2aa7cd0808cd5e41bf96a819a38d1745 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060312_byte/Pos_060312_byte_001/Pos_060312_byte_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f05f544f4485c281ffe89e5f5cde2a8faa3e510a --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.3.13, Verify that unsigned byte type (8bit) shall be translated to TTCN-3 as a plain unsigned byte as defined in clause D.2.1.0 of ES 201 873 1 [1] + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060313_unsigned_byte_001 { + + import from schema_Pos_060313_unsigned_byte_001 language "XSD" all; + + template E1 m_msg := 255; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060313_unsigned_byte_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060313_unsigned_byte_001.xml", { "Pos_060313_unsigned_byte_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060313_unsigned_byte_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ef35976b3f79476e03752b1de17a6d04ecea4fe --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xml @@ -0,0 +1,4 @@ + +255 diff --git a/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b4f8bb39901c1d517edfc034e9322e783d6de3a1 --- /dev/null +++ b/xml/06_built_in_data_types/0603_integer_types/060313_unsigned_byte/Pos_060313_unsigned_byte_001/Pos_060313_unsigned_byte_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bd50de3ac886d3aabe8aae6227af46bc1e4fc72a --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.1, Verify that decimal type shall be translated to TTCN-3 as a plain float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060401_decimal_001 { + + import from schema_Pos_060401_decimal_001 language "XSD" all; + + template E1 m_msg := -5.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060401_decimal_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060401_decimal_001.xml", { "Pos_060401_decimal_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060401_decimal_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..739b1ccea6491a5b9bda980135d36a903a3ce1a2 --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xml @@ -0,0 +1,4 @@ + +-5.0 diff --git a/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b160f8a9afb67f2e96e3f8426ab3d95c7624a0b2 --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060401_decimal/Pos_060401_decimal_001/Pos_060401_decimal_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4315bdbc34673ab66cdd81316facc41dd9f8e490 --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.2, Verify conversion of XSD float type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The float type shall be translated to TTCN-3 as an IEEE754float as defined in +// clause D.2.1.4 of ES 201 873-1 [1] + +module Pos_060402_float_001 { + + import from schema_Pos_060402_float_001 language "XSD" all; + + template MyType m_msg := 3.14; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060402_float_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060402_float_001.xml", { "Pos_060402_float_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060402_float_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..697a4c7924aafa08e97a44ec6ff8f68b9dfbcc5e --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xml @@ -0,0 +1,2 @@ + +3.14 \ No newline at end of file diff --git a/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a5f395490e5089235f0dec58a828a2155fc8110c --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060402_float/Pos_060402_float_001/Pos_060402_float_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..61944c9d96308f6ebf14982e550de6b1b26e09e3 --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.4.3, Verify that double type shall be translated to TTCN-3 as an IEEE754double as defined in clause D.2.1.4 of ES 201 873 1 [1]: + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060403_double_001 { + + import from schema_Pos_060403_double_001 language "XSD" all; + + template E1 m_msg := 1.23E9; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060403_double_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060403_double_001.xml", { "Pos_060403_double_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060403_double_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f1035ba4571e9103ea53890cadc620292c0c0fc --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xml @@ -0,0 +1,4 @@ + +1.23E9 diff --git a/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3f4408bcbcb6349814e137290498e770d7f9c213 --- /dev/null +++ b/xml/06_built_in_data_types/0604_float_types/060403_double/Pos_060403_double_001/Pos_060403_double_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2874cd3f5523af48f4e06ec8225cf990b0c6a2ce --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.1, Verify mapping of the duration type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060501_duration_001 { + + import from schema_Pos_060501_duration_001 language "XSD" all; + + template Test m_msg := "P5Y"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060501_duration_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060501_duration_001.xml", { "Pos_060501_duration_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060501_duration_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..84668196cf3aa57c4ff82402dd342666dbebdd76 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xml @@ -0,0 +1,3 @@ + +P5Y diff --git a/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..38f9f6bb2f5136329c60bdeb19b2817e745e45a7 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060501_duration/Pos_060501_duration_001/Pos_060501_duration_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d6f19206179e9d9a49a1fada872ddb37932dff31 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_001 { + + import from schema_Neg_060502_date_and_time_001 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59"; //invalid value + + + /** + * @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_060502_date_and_time_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_060502_date_and_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..22ec9e823e6a4f25e73df63917ed17b86e313eda --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_001/Neg_060502_date_and_time_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..751cb25de1470e1f38cdea112b08a76448e91819 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_002 { + + import from schema_Neg_060502_date_and_time_002 language "XSD" all; + + template E1 m_msg := "2014-04-1713:59"; //invalid value + + + /** + * @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_060502_date_and_time_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_060502_date_and_time_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..34e89d8c09855b2d97b10945834ab4c143cd9db4 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_002/Neg_060502_date_and_time_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ad3b2b0173a05a79d3899e2573080fed1b6a2552 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_003 { + + import from schema_Neg_060502_date_and_time_003 language "XSD" all; + + template E1 m_msg := "99-04-17T13:59"; //invalid value + + + /** + * @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_060502_date_and_time_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_060502_date_and_time_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..88058aba112a02c8ef10b283ef0dbe2964224a90 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_003/Neg_060502_date_and_time_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..71e9e5d4f65ab6fd66c75c0c4616e89761ceeb84 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060502_date_and_time_004 { + + import from schema_Neg_060502_date_and_time_004 language "XSD" all; + + template E1 m_msg := "2014-04-17"; //invalid value + + + /** + * @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_060502_date_and_time_004() 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_060502_date_and_time_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1b761395a45c98530e64e7314f8765e9ea73cde1 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Neg_060502_date_and_time_004/Neg_060502_date_and_time_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5fa2896b91953aa3450c1b40ec57385336126b02 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_001 { + + import from schema_Pos_060502_date_and_time_001 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_001.xml", { "Pos_060502_date_and_time_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e2edc672387df2e955dd74388ef408cb5081c05 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eff546175262ea396271e69982d09a53ccff455a --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_001/Pos_060502_date_and_time_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f7c95427de7676e65ffcbe1c63fc2f295a39234a --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_002 { + + import from schema_Pos_060502_date_and_time_002 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00.5"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_002.xml", { "Pos_060502_date_and_time_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..175507d18a46b6ac97e70f21aea56c23eb868383 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00.5 diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4ee2991d1043ecfd6104a19c13a97393fc9225ab --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_002/Pos_060502_date_and_time_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c4a6089b72ccaff6bea89afb7e77f59d4da531d --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_003 { + + import from schema_Pos_060502_date_and_time_003 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00+01:00"; //+01h = Central Europa + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_003.xml", { "Pos_060502_date_and_time_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..68c8f12ef501aca9b50e5a4c6429ffd1a23b00ca --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00+01:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..221fb441647cc098e53624b29ff7d0bc312a21ac --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_003/Pos_060502_date_and_time_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7698487875702783ac68e29d7b15f9fabd9fa445 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.2, Verify that the dateTime type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060502_date_and_time_004 { + + import from schema_Pos_060502_date_and_time_004 language "XSD" all; + + template E1 m_msg := "2014-04-17T13:59:00Z";// Coordinated Universal Time (UTC) + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060502_date_and_time_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060502_date_and_time_004.xml", { "Pos_060502_date_and_time_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060502_date_and_time_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..759116dc951d952ef5882ab01d56b307dfe7af4b --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xml @@ -0,0 +1,4 @@ + +2014-04-17T13:59:00Z diff --git a/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..095fbbf0229f68a2c49704eb182eeeda87b21475 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060502_date_and_time/Pos_060502_date_and_time_004/Pos_060502_date_and_time_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b25db80a319d3964e75072b058072dc8475fc21e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.3, Verify mapping of the time type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060503_time_001 { + + import from schema_Pos_060503_time_001 language "XSD" all; + + template Test m_msg := "09:30:10.5"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060503_time_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060503_time_001.xml", { "Pos_060503_time_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060503_time_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f0ebb03d939ce0b7c4352b97ee7799e8bc4688b --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xml @@ -0,0 +1,3 @@ + +09:30:10.5 diff --git a/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bea47182e8c96a2270514a7394fa3c72fde4c024 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060503_time/Pos_060503_time/Pos_060503_time_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..21d1ac2c3a65befe71f6663c0d326dff615c580f --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_001 { + + import from schema_Neg_060504_date_001 language "XSD" all; + + template E1 m_msg := "99-04-12"; //wrong format + + + /** + * @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_060504_date_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_060504_date_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5f71502a863169a1e166ebe12b45c1a84e19a344 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_001/Neg_060504_date_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..19d9c2980769b52e66e9cce63ae244babafcd38c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_002 { + + import from schema_Neg_060504_date_002 language "XSD" all; + + template E1 m_msg := "2014-4-2"; //wrong format + + + /** + * @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_060504_date_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_060504_date_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e4fda32b74c0681ef0796eef264e2a178537e1d8 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_002/Neg_060504_date_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d7446127bc23106c0234d0907e0a106692f3d362 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_003 { + + import from schema_Neg_060504_date_003 language "XSD" all; + + template E1 m_msg := "2014/04/02"; //wrong format - slash not alowed + + + /** + * @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_060504_date_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_060504_date_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8b9a66e63331a452fc0ee17b0a286f8f9479f05c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_003/Neg_060504_date_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d443b2502ffa582541ff98147b2d7c04a2fd --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060504_date_004 { + + import from schema_Neg_060504_date_004 language "XSD" all; + + template E1 m_msg := "04-12-2014"; //wrong format must be 2014-04-12 + + + /** + * @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_060504_date_004() 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_060504_date_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3e8a7f94b9add846abfcedb936c5359cb26a51c7 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Neg_060504_date_004/Neg_060504_date_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a25e7edb9f3994cc20822b1365edbdbfa26cf30c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_001 { + + import from schema_Pos_060504_date_001 language "XSD" all; + + template E1 m_msg := "2014-04-12"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_001.xml", { "Pos_060504_date_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..cc545245709b7daa70bcbdce87a6b003f62956c1 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xml @@ -0,0 +1,4 @@ + +2014-04-12 diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ddddf8ed2add06a4992e206a742df7881ea8c621 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_001/Pos_060504_date_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..821c60c985bcb488a38981a6638d838c118d865a --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_002 { + + import from schema_Pos_060504_date_002 language "XSD" all; + + template E1 m_msg := "12014-04-12"; //April 12, 12014 + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_002.xml", { "Pos_060504_date_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..af6813ecaa277ab5a0e77f3e614bf066e7abb15f --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xml @@ -0,0 +1,4 @@ + +12014-04-12 diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1401094f2c27f6f3024fbef71c7db22a27ccaba4 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_002/Pos_060504_date_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24f4f00010b2c64a346cfb36ea53cd36c1735a92 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_003 { + + import from schema_Pos_060504_date_003 language "XSD" all; + + template E1 m_msg := "2014-04-12+01:00"; //+01:00 for CE + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_003.xml", { "Pos_060504_date_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..16c1fb85e90eed5b20d643be34c9495d726d8a8b --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xml @@ -0,0 +1,4 @@ + +2014-04-12+01:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..82057bacb55c71a2e236d3f6a21aaadf44f099b6 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_003/Pos_060504_date_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8716303bf124534511db734c587d64ac0a2fe4ee --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.4, Verify that the date type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060504_date_004 { + + import from schema_Pos_060504_date_004 language "XSD" all; + + template E1 m_msg := "2004-04-12Z"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060504_date_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060504_date_004.xml", { "Pos_060504_date_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060504_date_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..34d9bba31feb0f63b4c324b9f3819f1e8112853c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xml @@ -0,0 +1,4 @@ + +2004-04-12Z diff --git a/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a55a975289e725839cf5a19c46fbff392ca30f76 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060504_date/Pos_060504_date_004/Pos_060504_date_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cb9fa3ffc6fdccbbb95ad553eaeb8dddda13139c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_001 { + + import from schema_Neg_060505_gregorian_year_and_month_001 language "XSD" all; + + template E1 m_msg := "99-04"; //wrong format + + + /** + * @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_060505_gregorian_year_and_month_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_060505_gregorian_year_and_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..137615fe94eabb68dca467f7a13160f237c39623 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_001/Neg_060505_gregorian_year_and_month_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4ccf8b45440ef824c9c928aec481497f8efea428 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_002 { + + import from schema_Neg_060505_gregorian_year_and_month_002 language "XSD" all; + + template E1 m_msg := "2014"; //wrong format + + + /** + * @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_060505_gregorian_year_and_month_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_060505_gregorian_year_and_month_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..bfcc3be096d093fafd081b90dc8d274a3910c9ab --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_002/Neg_060505_gregorian_year_and_month_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6573925711e7c80fa911306ae185f82153fc020e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_003 { + + import from schema_Neg_060505_gregorian_year_and_month_003 language "XSD" all; + + template E1 m_msg := "2004-4"; //wrong format + + + /** + * @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_060505_gregorian_year_and_month_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_060505_gregorian_year_and_month_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..17a002fc1f0ed6167f55a51e41ea9a92abf51ca6 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_003/Neg_060505_gregorian_year_and_month_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..80f43a00914433064e2ab732d5e4864ff424e799 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060505_gregorian_year_and_month_004 { + + import from schema_Neg_060505_gregorian_year_and_month_004 language "XSD" all; + + template E1 m_msg := "2004-13"; //wrong format + + + /** + * @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_060505_gregorian_year_and_month_004() 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_060505_gregorian_year_and_month_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..21d0872a5152c0e010904cf710ff4f9ea746ef31 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Neg_060505_gregorian_year_and_month_004/Neg_060505_gregorian_year_and_month_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d0d261238672b806dbe6e1b87ac64d125964b19 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060505_gregorian_year_and_month_001 { + + import from schema_Pos_060505_gregorian_year_and_month_001 language "XSD" all; + + template E1 m_msg := "2014-04"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060505_gregorian_year_and_month_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060505_gregorian_year_and_month_001.xml", { "Pos_060505_gregorian_year_and_month_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060505_gregorian_year_and_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..741c3ea9201ee26a91536edc6388c24f594f5078 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xml @@ -0,0 +1,4 @@ + +2014-04 diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e1baf5685e2034b779cb7ca271fa9f6a4de97e45 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_001/Pos_060505_gregorian_year_and_month_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b14d3c3cf7037c3ded0eaf70ba7d025dd9214662 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.5, Verify that the gYearMonth type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060505_gregorian_year_and_month_002 { + + import from schema_Pos_060505_gregorian_year_and_month_002 language "XSD" all; + + template E1 m_msg := "2014-04-05:00"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060505_gregorian_year_and_month_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060505_gregorian_year_and_month_002.xml", { "Pos_060505_gregorian_year_and_month_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060505_gregorian_year_and_month_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..51a294c67dbb31da814a7e796d0e312c93dc564e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xml @@ -0,0 +1,4 @@ + +2014-04-05:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8ca66a62508a7e5997032a834bf70fe6ebbd620a --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060505_gregorian_year_and_month/Pos_060505_gregorian_year_and_month_002/Pos_060505_gregorian_year_and_month_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25c0c1cb4331398c69f39055c34a41c34c73d335 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass reject + ***************************************************/ +module Neg_060506_gregorian_year_001 { + + import from schema_Neg_060506_gregorian_year_001 language "XSD" all; + + template E1 m_msg := "99"; + + + /** + * @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_060506_gregorian_year_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_060506_gregorian_year_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..66463d68ea510f25b672a8f7b57634cdb9d8ce62 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Neg_060506_gregorian_year_001/Neg_060506_gregorian_year_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..581ce5f772f2a6b8b74f77b0bc82e868e430d50e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_001 { + + import from schema_Pos_060506_gregorian_year_001 language "XSD" all; + + template E1 m_msg := "2014"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_001.xml", { "Pos_060506_gregorian_year_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb498fbad2b9cf6217caa282b123c2d6f8d4855c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xml @@ -0,0 +1,4 @@ + +2014 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4d6ceab61a305b0f5290e046dcf88cb90f12e091 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_001/Pos_060506_gregorian_year_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..da589554a7e3416f358b87413c5f41903c2ca4ce --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_002 { + + import from schema_Pos_060506_gregorian_year_002 language "XSD" all; + + template E1 m_msg := "2014+01:00"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_002.xml", { "Pos_060506_gregorian_year_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f31cdce5485c2ab7852eb2afe0ebde1a37638ea5 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xml @@ -0,0 +1,4 @@ + +2014+01:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d3e21c4a6205ff06c3a0ecfc563e8c6146943636 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_002/Pos_060506_gregorian_year_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c8aa135b0de2112dc5ffae90d543bfd7031697c4 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear allows positive years greater than 9999 + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_003 { + + import from schema_Pos_060506_gregorian_year_003 language "XSD" all; + + template E1 m_msg := "12004"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_003.xml", { "Pos_060506_gregorian_year_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..4dfd21f37b15328bc209708aba12d9cadce72ee6 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xml @@ -0,0 +1,4 @@ + +12004 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cf2e1e226460b58d79f094b9a620ec177681f44c --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_003/Pos_060506_gregorian_year_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f8625c25589ad02af7a9e8b5a013e453e21d4a2e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear type shall be translated to TTCN-3 using the pattern-restricted charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_004 { + + import from schema_Pos_060506_gregorian_year_004 language "XSD" all; + + template E1 m_msg := "0922"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_004.xml", { "Pos_060506_gregorian_year_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e442b9d47cee28f30f5f48ee44995389237daba --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xml @@ -0,0 +1,4 @@ + +0922 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..aaefd2fae07a0b482fe14ea04a841f85cf618a09 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_004/Pos_060506_gregorian_year_004.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..188998f4b95992f4a9f950b2feeb7b1dbbd7812a --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear accepts negative years + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_005 { + + import from schema_Pos_060506_gregorian_year_005 language "XSD" all; + + template E1 m_msg := "-0045"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_005.xml", { "Pos_060506_gregorian_year_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..343f27b45ee2d968eaf98ee3298c90b563579702 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xml @@ -0,0 +1,4 @@ + +-0045 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..675e910732d5efcf2d4b9b689d2cbce720c635e4 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_005/Pos_060506_gregorian_year_005.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b0d00ba583b26d08873e752a252d58b9db669919 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.5.6, Verify that the gYear alows negative year with more than 4 digits + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060506_gregorian_year_006 { + + import from schema_Pos_060506_gregorian_year_006 language "XSD" all; + + template E1 m_msg := "-210045"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060506_gregorian_year_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060506_gregorian_year_006.xml", { "Pos_060506_gregorian_year_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060506_gregorian_year_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec64fc2975fa308f740a5bf49728eb3650ec9c9b --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xml @@ -0,0 +1,4 @@ + +-210045 diff --git a/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7bb2952b538c23f483869196d12f9795255ff866 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060506_gregorian_year/Pos_060506_gregorian_year_006/Pos_060506_gregorian_year_006.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a77bd319c1f43f47b4997a962b481f2e71bc870e --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.7, Verify mapping of the gMonthDay type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060507_gregorian_month_and_day_001 { + + import from schema_Pos_060507_gregorian_month_and_day_001 language "XSD" all; + + template Test m_msg := "--04-05"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060507_gregorian_month_and_day_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060507_gregorian_month_and_day_001.xml", { "Pos_060507_gregorian_month_and_day_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060507_gregorian_month_and_day_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..062fc42ea12cb350759e460aa6c0f06b5e2affaf --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xml @@ -0,0 +1,3 @@ + +--04-05 diff --git a/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..48a3d30bc39ce00f502abfd05aa95cb37d17b941 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060507_gregorian_month_and_day/Pos_060507_gregorian_month_and_day_001/Pos_060507_gregorian_month_and_day_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6fea315a2ef12283df9363b37ce9bc9836ec2f1d --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.8, Verify mapping of the gDay type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060508_gregorian_day_001 { + + import from schema_Pos_060508_gregorian_day_001 language "XSD" all; + + template Test m_msg := "---01+02:00"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060508_gregorian_day_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060508_gregorian_day_001.xml", { "Pos_060508_gregorian_day_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060508_gregorian_day_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..e92a225098b1311d59288ced4f52b4f4920af630 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xml @@ -0,0 +1,3 @@ + +---01+02:00 diff --git a/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a9ad42ec20f49223ca546eec58f5295f2dd520ea --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060508_gregorian_day/Pos_060508_gregorian_day_001/Pos_060508_gregorian_day_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..91cc7d64d13a36cf439defbf5c5f7e795f5fa035 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.5.9, Verify mapping of the gMonth type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060509_gregorian_month_001 { + + import from schema_Pos_060509_gregorian_month_001 language "XSD" all; + + template Test m_msg := "--11Z"; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060509_gregorian_month_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060509_gregorian_month_001.xml", { "Pos_060509_gregorian_month_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060509_gregorian_month_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa4b9c770f3d896bcf92d6a57f798fcfa852c561 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xml @@ -0,0 +1,3 @@ + +--11Z diff --git a/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..55e1645e4ee34447b67c1a6316dacc8c560fabb4 --- /dev/null +++ b/xml/06_built_in_data_types/0605_time_types/060509_gregorian_month/Pos_060509_gregorian_month_001/Pos_060509_gregorian_month_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e7228b729fa6ad7ce077d5317869b03c3d284f9f --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.1, Verify mapping of a NMTOKENS type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060601_nmtokens_001 { + + import from schema_Pos_060601_nmtokens_001 language "XSD" all; + + template Test m_msg := { "brought", "classical", "music", "to", "the", "Peanuts", "strip" }; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060601_nmtokens_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060601_nmtokens_001.xml", { "Pos_060601_nmtokens_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060601_nmtokens_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..259e92c89a6c8b3385a147e0eac78677fa0d4b53 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xml @@ -0,0 +1,3 @@ + +brought classical music to the Peanuts strip diff --git a/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..076f84a810f549002bd8f7a778c88c87ee1a5fd8 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060601_nmtokens/Pos_060601_nmtokens_001/Pos_060601_nmtokens_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..45215459d46ac80a3bbefb70cccc089e54a6dd52 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.2, Verify mapping of a IDREFS type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060602_idrefs_001 { + + import from schema_Pos_060602_idrefs_001 language "XSD" all; + + template Test m_msg := { + item_list := { "abc", "def", "ghi" }, + itemrefs := { "ghi", "def", "abc" } + } + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060602_idrefs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060602_idrefs_001.xml", { "Pos_060602_idrefs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060602_idrefs_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..368c97bd888bcb252bc1a2bf26f2ef3a6df50f56 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xml @@ -0,0 +1,8 @@ + + + abc + def + ghi + ghi def abc + diff --git a/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..74b71ba91b028ed5a2eaa7066a942aee19c47639 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060602_idrefs/Pos_060602_idrefs_001/Pos_060602_idrefs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d1678b7708084c55fc042aba30ca06a58a5d4ab0 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.6.4, Verify mapping of the QName type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_060604_qname_001 { + + import from schema_Pos_060604_qname_001 language "XSD" all; + + template Test m_msg := { + uri := "schema:Pos_060604_qname_001", + name := "test" + }; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_060604_qname_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_060604_qname_001.xml", { "Pos_060604_qname_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_060604_qname_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c6b10ec80afb3610ed42f40442e4b7f77bd23c0d --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xml @@ -0,0 +1,3 @@ + +ns:test diff --git a/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1c7b4836c34b7d30214ef07af9bf35dc5b622857 --- /dev/null +++ b/xml/06_built_in_data_types/0606_sequence_types/060604_qname/Pos_060604_qname_001/Pos_060604_qname_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c0e3a04544543b499494e497aabd3b5ce04b3119 --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.7, Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_0607_boolean_type_001 { + + import from schema_Pos_0607_boolean_type_001 language "XSD" all; + + template E1 m_msg := true; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0607_boolean_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0607_boolean_type_001.xml", { "Pos_0607_boolean_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0607_boolean_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8e01051230f6219454164ec1aadaf370ed208077 --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xml @@ -0,0 +1,4 @@ + +true diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1b17dfeb86ce3c0d461839376aa968f9a75db5e3 --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_001/Pos_0607_boolean_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0a0534ee70340e58cc95b8609d2fb445e0348ad6 --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.ttcn @@ -0,0 +1,79 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.7, Verify that the XSD boolean type shall be mapped to the TTCN-3 boolean type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_0607_boolean_type_002 { + + import from schema_Pos_0607_boolean_type_002 language "XSD" all; + + template E1 m_msg := false; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0607_boolean_type_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0607_boolean_type_002.xml", { "Pos_0607_boolean_type_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0607_boolean_type_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..a21d6bd6c523017f5db81ffb89bd059e3d103883 --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xml @@ -0,0 +1,4 @@ + +false diff --git a/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2e06c0e080bba52ac3b7bdac24f36cfa7dc0240d --- /dev/null +++ b/xml/06_built_in_data_types/0607_boolean_type/Pos_0607_boolean_type_002/Pos_0607_boolean_type_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..216343f4a839d41889050212ff341a506f99fe6a --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of anySimpleType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD anySimpleType can be considered as the base type of all primitive +// data types. The anySimpleType shall be translated as an XML compatible +// restricted subtype of the universal charstring. + +module Pos_0608_anytype_and_anysimpletype_types_001 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_001.xml", { "Pos_0608_anytype_and_anysimpletype_types_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..061ea0ec4c783060629519e4bf3ec74a2fd5824a --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9a833fc556799b4735eec22db86a8a17a8093729 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_001/Pos_0608_anytype_and_anysimpletype_types_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ad15aa69c52b39e91ac4ed547b62846e014aef61 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of anyType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD anyType is the base type of all complex definitions and the +// anySimpleType. AnyType is translated into XML content opaque to the codec. + +module Pos_0608_anytype_and_anysimpletype_types_002 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_002 language "XSD" all; + + template MyType m_msg := { + embed_values := omit, + attr := {"schema:Pos_0608_anytype_and_anysimpletype_types_002 attr=""abc"""}, + elem_list := { + "foo", + "bar" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_002.xml", { "Pos_0608_anytype_and_anysimpletype_types_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..67226185dc4ca9cf148904a3a47db5576790dfcf --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xml @@ -0,0 +1,2 @@ + +foobar \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e1ab521049ddea1077c0b99994caf71a8469745e --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_002/Pos_0608_anytype_and_anysimpletype_types_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..75feeeb780c94d0c4ed41aa0409ec03ff21a601f --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Conversion of anyType with mixed content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_003 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_003 language "XSD" all; + + template MyType m_msg := { + embed_values := { "The ordered ", " has arrived. ", " not delivered yet."}, + attr := {"schema:Pos_0608_anytype_and_anysimpletype_types_003 attr=""abc"""}, + elem_list := { + "foo", + "bar" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_003.xml", { "Pos_0608_anytype_and_anysimpletype_types_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..33c04303f95d773cd1b161d09378cce4eb029910 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xml @@ -0,0 +1,2 @@ + +The ordered foo has arrived. bar not delivered yet. \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a48ae8a6139dbf1497d62c09669673813e997fc6 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_003/Pos_0608_anytype_and_anysimpletype_types_003.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d249124d077ce5a1a62225b44e1ad4cfe4609e00 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Nillable anyType element (nill option, content not present) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_004 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_004 language "XSD" all; + + template MyType m_msg := { + content := omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_004.xml", { "Pos_0608_anytype_and_anysimpletype_types_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..839b8ae3fb0add5778898d06dc187c609aaf4260 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ef79f8e5af0c4f87a5edf12e791b34d448e1f85d --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_004/Pos_0608_anytype_and_anysimpletype_types_004.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2371f5516a03aa5a9ab151ec72a5c4fe4ec86477 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.8, Nillable anyType element (content is present) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The following requirements are tested: +// An element of anyType is able to carry any syntactically valid (well-formed) +// XML content, including mixed content. Each TTCN-3 element of the field attr +// shall contain a complete, valid XML attribute, including its name and value. +// Each TTCN-3 element of the field elem_list shall contain a syntactically valid +// XML element. If the embed_values field is not omitted in the TTCN-3 value or +// template instance, its content shall be handled according to clause 7.6.8. + +module Pos_0608_anytype_and_anysimpletype_types_005 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_005 language "XSD" all; + + template MyType m_msg := { + content := { + embed_values := omit, + attr := omit, + elem_list := { + "foo", + "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0608_anytype_and_anysimpletype_types_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0608_anytype_and_anysimpletype_types_005.xml", { "Pos_0608_anytype_and_anysimpletype_types_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..041d89b2795f8d213aeed850fe087f41ca68013d --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xml @@ -0,0 +1,2 @@ + +foobar \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..283527438a497008248d6ae509c3ff0aaaa055fc --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_005/Pos_0608_anytype_and_anysimpletype_types_005.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b704382afa5414ba72b0358ad17dd1ab5ca6ec86 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of XSD anySimpleType to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_Pos_0608_anytype_and_anysimpletype_types_006 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_006 language "XSD" all; + + template MyType m_msg := { integer := 1 }; + + + + /** + * @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_Pos_0608_anytype_and_anysimpletype_types_006() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..3967ff9a869fed321fd4948d5ae491f675faa9df --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..08dae172898c57f4fd64551006433ec500c2c8b0 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_006/Pos_0608_anytype_and_anysimpletype_types_006.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..199156317fc9b0f57523ed0a080f8a12bf28f86e --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:6.8, Verify conversion of XSD anyType to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_Pos_0608_anytype_and_anysimpletype_types_007 { + + import from schema_Pos_0608_anytype_and_anysimpletype_types_007 language "XSD" all; + + template MyType m_msg := { embed_values := omit, attr := omit, elem_list := { { Something := 1 } } }; + + + + /** + * @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_Pos_0608_anytype_and_anysimpletype_types_007() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0608_anytype_and_anysimpletype_types_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..79246653ecee3ebae1e682638c3324a652f4be20 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e7b9b5d553657e00794e55610d2875195a4143f3 --- /dev/null +++ b/xml/06_built_in_data_types/0608_anytype_and_anysimpletype_types/Pos_0608_anytype_and_anysimpletype_types_007/Pos_0608_anytype_and_anysimpletype_types_007.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eeac2d6dff2ee9af9e0373c52d51a9e55dd71832 --- /dev/null +++ b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:6, Verify conversion of simpleType based on built-in XSD type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD built-in data types may be primitive or derived types. The latter are +// gained from primitive types by means of a restriction mechanism called +// facets. For the mapping of primitive types, a specific TTCN-3 module XSD is +// provided by the present document, which defines the relation of XSD primitive +// types to TTCN-3 types. Whenever a new simpleType is defined, with +// a built-in XSD type as its base type, it shall be mapped directly from types +// defined in the module XSD. + +module Pos_06_top_level_001 { + + import from schema_Pos_06_top_level_001 language "XSD" all; + + template E1 m_base := 5; + template MyType m_msg := m_base; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_06_top_level_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_06_top_level_001.xml", { "Pos_06_top_level_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_06_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1551b8968528878e16f33d6c2ac3b5734ca0141 --- /dev/null +++ b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..000df5b6b68b1fa995deb6a54bba271bfc65a928 --- /dev/null +++ b/xml/06_built_in_data_types/06_top_level/Pos_06_top_level_001/Pos_06_top_level_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7fc3630e2464104322b982e2c35d6376afc744e0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.1, Verify conversion of id attribute of global element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The attribute id enables a unique identification of an XSD component. They +// shall be mapped to TTCN-3 as simple type references, e.g. any component +// mapping to a type with name typeName and an attribute id="ID" shall result in +// an additional TTCN-3 type declaration. + +module Pos_070101_id_001 { + + import from schema_Pos_070101_id_001 language "XSD" all; + + template ProductType m_base := {name := "Moby Dick", price := "$12.4"}; + template MyType m_msg := m_base; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070101_id_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070101_id_001.xml", { "Pos_070101_id_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070101_id_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..80e6372844c49058d135b766528b565c5053a208 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xml @@ -0,0 +1,5 @@ + + +Moby Dick +$12.4 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9a3630ba2f868a61c4f7890c29d4acb003042779 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_001/Pos_070101_id_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3bfe50111f283c3bd2e2943dde4df42c1cb1b8de --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.1, verify conversion of id attribute of local element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The attribute id enables a unique identification of an XSD component. They +// shall be mapped to TTCN-3 as simple type references, e.g. any component +// mapping to a type with name typeName and an attribute id="ID" shall result in +// an additional TTCN-3 type declaration. + +module Pos_070101_id_002 { + + import from schema_Pos_070101_id_002 language "XSD" all; + + template E01 m_base := "test"; + template MyType m_msg := { + foo := m_base + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070101_id_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070101_id_002.xml", { "Pos_070101_id_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070101_id_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe953a7b1bdb2135dea4a913071e363979a21f68 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xml @@ -0,0 +1,4 @@ + + + test + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d581a968d6a3ad05bc3c692709b7b773077eb588 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070101_id/Pos_070101_id_002/Pos_070101_id_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e4653ef794f748cf94758501f885fe0cf3ab2000 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,47 @@ +/*************************************************** + ** @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); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..472e75306d6c4cd9a5830164c64cf8d3a68b409c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_001/Neg_070104_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0fa4af4876bde27e420cd4952f0387549188b2c7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @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); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a45f19f8da3979b603af66239776e781f763595c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_002/Neg_070104_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8c8d23e4b1cd44246c49bddc5b8e76e9beb2666b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,46 @@ +/*************************************************** + ** @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); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6f812947653b7179f068c696c809151cec3c2762 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Neg_070104_minoccurs_and_maxoccurs_003/Neg_070104_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..76209dd262f65a4ee23fd2f14596f4527d35b16e --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, Optional field defined by minOccurs has to be mapped as optional in TTCN-3 + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_001 language "XSD" all; + + template ElemE15a m_msg := {foo := omit, bar := 2.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_001.xml", { "Pos_070104_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..9fa3d1b7a31e4f71448ea538ea536402a010ffa3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,4 @@ + + + 2.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ddb0865eee24426f6fc6bb46cec3536d4fc7792b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_001/Pos_070104_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..534dbe88eb154b516476cf8682972c681f792f32 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, Optional field defined by minOccurs has to exist in TTCN-3 and match the value + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_002 language "XSD" all; + + template ElemE15a m_msg := {foo := 5, bar := 2.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_002.xml", { "Pos_070104_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c16f2ddee2fdcbe2fe3becf9c8ede6a3396f396 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + 5 + 2.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..eda26ff9e177b2640ce13bd6802f4cda50c975a0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_002/Pos_070104_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..82fa200ca87fc040ba092a4a74ac7829f06d5f8d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, a list with minOccurs 0 should allow zero elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_003 language "XSD" all; + + template ElemE15b m_msg := {foo_list := {}, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_003.xml", { "Pos_070104_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..036ca8e5362b42b32ec7d9c57328c8b6b0c9fef7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,4 @@ + + + 3.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7abfcb15f9498467c6b5327a11dc24896238b809 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_003/Pos_070104_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4e0047983f54557f34f202689a189003f67dff61 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list (0, unbounded) should allow elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_004 language "XSD" all; + + template ElemE15b m_msg := {foo_list := {1, 2, 3, 4, 5}, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_004.xml", { "Pos_070104_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..79d796984deabf2fb6cb878add0c890f9c11790f --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,9 @@ + + + 1 + 2 + 3 + 4 + 5 + 3.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..edd40757a808fe30d7f6ce97fbb322f7cb7562c5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_004/Pos_070104_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bf91c4b88569a945b9fcba902ff9ec3f9122fd3a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 5 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_005 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_005 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5}, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_005.xml", { "Pos_070104_minoccurs_and_maxoccurs_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..817efad5d1ce0d9a78ad4e30dc680b80a38dc093 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xml @@ -0,0 +1,9 @@ + + + 1 + 2 + 3 + 4 + 5 + 3.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d6ba0d8329dc0a471418082199205d9e44655bea --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_005/Pos_070104_minoccurs_and_maxoccurs_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..15e0dd533aae384ea298deadbd34d40d362153f9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 10 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_006 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_006 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_006.xml", { "Pos_070104_minoccurs_and_maxoccurs_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..5f1fdf14e36548c69b4d7cf9cf378b24f5736224 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xml @@ -0,0 +1,14 @@ + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 3.0 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..64192b63cca402885614ff4ba2e7d7c802478aa6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_006/Pos_070104_minoccurs_and_maxoccurs_006.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f09aa4833176752f317e13b7a3d1683a00d86e8f --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.4, A restricted length list [5, 10] should allow 7 elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070104_minoccurs_and_maxoccurs_007 { + + import from schema_Pos_070104_minoccurs_and_maxoccurs_007 language "XSD" all; + + template ElemE15c m_msg := {foo_list := {1, 2, 3, 4, 5, 6, 7}, bar := 15.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070104_minoccurs_and_maxoccurs_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070104_minoccurs_and_maxoccurs_007.xml", { "Pos_070104_minoccurs_and_maxoccurs_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070104_minoccurs_and_maxoccurs_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..fca38cbbf18505fbfdb0a29ebac1ec050666edbd --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xml @@ -0,0 +1,11 @@ + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 15.0 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3714524663a0bcdbf5e99d3fe07413ef2b739567 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070104_minoccurs_and_maxoccurs/Pos_070104_minoccurs_and_maxoccurs_007/Pos_070104_minoccurs_and_maxoccurs_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2420f07afab3bda845474e74e310becf8546dcb3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.ttcn @@ -0,0 +1,54 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify constraint of type based on XSD definition with fixed attribute + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. The fixed attribute +// applied to XSD facets shall be ignored. + +module Neg_070105_default_and_fixed_001 { + + import from schema_Neg_070105_default_and_fixed_001 language "XSD" all; + + template MyType m_msg := "notFixedValue"; + + + + /** + * @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_070105_default_and_fixed_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_070105_default_and_fixed_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..19b2046d7baccce85bc68d3465e7c6c787646867 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Neg_070105_default_and_fixed_001/Neg_070105_default_and_fixed_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec3a631052a7bab7d70e91c8e7a56f5ffda0de8a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify conversion of fixed attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. The fixed attribute +// applied to XSD facets shall be ignored. + +module Pos_070105_default_and_fixed_001 { + + import from schema_Pos_070105_default_and_fixed_001 language "XSD" all; + + template MyType m_msg := "fixedValue"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070105_default_and_fixed_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070105_default_and_fixed_001.xml", { "Pos_070105_default_and_fixed_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d02071b941c17b8cde4fb990e69a58fd88a35b28 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xml @@ -0,0 +1,2 @@ + +fixedValue \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..97ef8b4f2588425309a518727d6d8698f8cd6a4a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_001/Pos_070105_default_and_fixed_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..48d9f235235a651fe58e2b68cccf6f1327796692 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify conversion of default attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// As default has no equivalent in TTCN-3 space, it shall be mapped to +// a "defaultForEmpty …" encoding instruction. + +module Pos_070105_default_and_fixed_002 { + + import from schema_Pos_070105_default_and_fixed_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070105_default_and_fixed_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070105_default_and_fixed_002.xml", { "Pos_070105_default_and_fixed_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..e8ca2351c9edd6ba51a552772b747fbab24fb824 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..30a096af7e1e779f03553d12df9af1fa9c424121 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_002/Pos_070105_default_and_fixed_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f104eece3d7fcea44e430d8d2651136c8effe46e --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify that default value is automatically assigned to empty element by decoder + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// As default has no equivalent in TTCN-3 space, it shall be mapped to +// a "defaultForEmpty …" encoding instruction. +// From B.3.7: This encoding instruction ... designates that the decoder shall +// insert the value specified by freetext if the corresponding attribute is +// omitted or when the corresponding element appears without any content in the +// XML instance being decoded; it has no effect in other cases. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070105_default_and_fixed_003 { + + import from schema_Pos_070105_default_and_fixed_003 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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; + } + + /** + * @desc Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + + testcase TC_Pos_070105_default_and_fixed_003() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + v_rcv := readFile("Pos_070105_default_and_fixed_003.xml"); + + // send the encoded the message + p.send(v_rcv); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // decode the message + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..43fb980400bd53361fdac56a224b7821eb1f9c06 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3247045aa83a47dfbce4b237416c8d726fbb15c5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_003/Pos_070105_default_and_fixed_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..27e3e52e8fe996c21d1dba5bae82f66ae1fb0fc5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.5, Verify that fixed value is automatically assigned to empty element by decoder + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The fixed attribute applied to attribute or element elements shall be mapped +// to a subtype definition with the single allowed value identical to the value +// of the fixed attribute plus a "defaultForEmpty …" encoding instruction +// identifying the value of the fixed attribute as well. +// From B.3.7: This encoding instruction ... designates that the decoder shall +// insert the value specified by freetext if the corresponding attribute is +// omitted or when the corresponding element appears without any content in the +// XML instance being decoded; it has no effect in other cases. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070105_default_and_fixed_004 { + + import from schema_Pos_070105_default_and_fixed_004 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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; + } + + /** + * @desc Read a UTF-8 formated XML file from disc. + * @param p_referenceXmlFile the XML file + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return the UTF-8 contents of p_referenceXmlFile + */ + external function readFile(universal charstring p_referenceXmlFile, universal charstring p_referenceTTCN3File := __FILE__) return universal charstring; + + testcase TC_Pos_070105_default_and_fixed_004() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + v_rcv := readFile("Pos_070105_default_and_fixed_004.xml"); + + // send the encoded the message + p.send(v_rcv); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // decode the message + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070105_default_and_fixed_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..2c61b1080699fda206df535c81e13c8602bc1fea --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..abea4ade0783e90190d93934e7d4a137d1e109f4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070105_default_and_fixed/Pos_070105_default_and_fixed_004/Pos_070105_default_and_fixed_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24c3f8a82306db7c9be198f43c6213902a20787b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified attribute form is correctly converted (unqualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the form attribute is ... unqualified and no +// attributeFormQualified encoding instruction is assigned to the corresponding +// TTCN-3 module, the form attribute shall be ignored. + +module Pos_070106_form_001 { + + import from schema_Pos_070106_form_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_001.xml", { "Pos_070106_form_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..b45fa50fde20d4a9567d4e5ac7f1831a73763881 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3ce47e7e84d3b05c29ff5ebedee993759566be92 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_001/Pos_070106_form_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec8dc3205df20e30cc39ef83d3a3c16658d7a01a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified attribute form is correctly converted (qualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of a form attribute of an XSD attribute declaration is +// unqualified and the attributeFormQualified encoding instruction is attached +// to the target TTCN-3 module ... a "form as unqualified" encoding instruction +// shall be attached to the TTCN-3 field resulted from mapping the given XSD +// attribute ... declaration. + +module Pos_070106_form_002 { + + import from schema_Pos_070106_form_002 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_002.xml", { "Pos_070106_form_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..0688535f3479d3b78b9295e15129b9b6aa52f5ff --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f7320229bd62a3b0e60b007eb9afc272510164aa --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_002/Pos_070106_form_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7ae364106aef218912605d0df304f4ef8226bfa6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified attribute form is correctly converted (unqualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of a form attribute of an XSD attribute declaration is qualified +// and no attributeFormQualified encoding instruction is attached to the target +// TTCN-3 module ... a "form as qualified" encoding instruction shall be +// attached to the TTCN-3 field resulted from mapping the given XSD attribute +// ... declaration. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070106_form_003 { + + import from schema_Pos_070106_form_003 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_003.xml", { "Pos_070106_form_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb4840895444791a51f3422931333328e34cb7e9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3b4641db693585e999f70192f980f43da164b91c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_003/Pos_070106_form_003.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1a52d52a3cea4b9827987bdd52f1e18cfce78b9b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified attribute form is correctly converted (qualified attributeFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the form attribute is qualified and the +// attributeFormQualified encoding instruction is attached to the TTCN-3 module +// the given XSD declaration contributes to ... the form attribute shall be +// ignored. + +module Pos_070106_form_004 { + + import from schema_Pos_070106_form_004 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_004.xml", { "Pos_070106_form_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..f5a0e995defcd0fafe028150e4d90edf34dceb6f --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..300e50864a8be1a063bfd6da3f2a3fbbe0b69764 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_004/Pos_070106_form_004.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6b8156bb8c1de521d73430d1f36d920518cbf94c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified element form is correctly converted (unqualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD form attribute controls if an attribute or element tag shall be +// encoded in XML by using a qualified or unqualified name. The values of the +// form attributes shall be preserved in the "form as…" encoding instructions. + +module Pos_070106_form_005 { + + import from schema_Pos_070106_form_005 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_005.xml", { "Pos_070106_form_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..839cce4586b23678ea2309fd4326575ac489e3e8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3104ce7d74e064c1354edd2ac9c46a2fa5e4cc8b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_005/Pos_070106_form_005.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c8ee9e4e834dbb373630a10fb27abc5d24de26d3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that unqualified element form is correctly converted (qualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If ... the value of a form attribute of an element declaration is unqualified +// and the elementFormQualified encoding instruction is attached to the target +// TTCN-3 module, a "form as unqualified" encoding instruction shall be attached +// to the TTCN-3 field resulted from mapping the given XSD ... element +// declaration. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070106_form_006 { + + import from schema_Pos_070106_form_006 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_006.xml", { "Pos_070106_form_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..915880addb72df3cb405499d9a9650d7b3ec526d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4b12e73487827d300b828a7a1791adeb10bf4b00 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_006/Pos_070106_form_006.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..742ca7e37de633cdfa56ac2c7622b7dd6bda3c8d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified element form is correctly converted (unqualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If ... the value of a form attribute of an element declaration is qualified +// and no elementFormQualified encoding instruction is attached to the target +// TTCN-3 module, a "form as qualified" encoding instruction shall be attached +// to the TTCN-3 field resulted from mapping the given XSD attribute or element +// declaration. + +module Pos_070106_form_007 { + + import from schema_Pos_070106_form_007 language "XSD" all; + + template MyType m_msg := { + foo:="foo" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_007.xml", { "Pos_070106_form_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..662535549eeca1ffa7663c18a66f75f1a0ceb138 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0cb9a6fc0eb4cecc74b3387a5322be8730fc0d0b --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_007/Pos_070106_form_007.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f52dd531ab8b46cf1b3fb995cd7523cae9f7a5a1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.6, Verify that qualified element form is correctly converted (qualified elementFormDefault) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD form attribute controls if an attribute or element tag shall be +// encoded in XML by using a qualified or unqualified name. The values of the +// form attributes shall be preserved in the "form as…" encoding instructions. + +module Pos_070106_form_008 { + + import from schema_Pos_070106_form_008 language "XSD" all; + + template MyType m_msg := { + foo := "foo" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_008.xml", { "Pos_070106_form_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml new file mode 100644 index 0000000000000000000000000000000000000000..a77a15bb5e374c04541f1709fe2e187d8119ff95 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xml @@ -0,0 +1,4 @@ + + + foo + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cf7c401b0c88eebe35970d9b179c559926f0f307 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_008/Pos_070106_form_008.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d765c7329ed667998d918d805c8e4b804306aec9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for elementFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_009 { + + import from schema_Pos_070106_form_009 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {myField := 2}, + myElement := {myField := 3} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_009.xml", { "Pos_070106_form_009.xsd", "Pos_070106_form_009_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml new file mode 100644 index 0000000000000000000000000000000000000000..4ea7d998bdfc69a15c185d64ded14e6fdd8687cb --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xml @@ -0,0 +1,11 @@ + + + 1 + + 2 + + + 3 + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6e31ce8ad12c5463f0ed7bc434654ba5adeed5b1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fc15b47127e9e5af0a22a038a9702f5eaff3aa53 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_009/Pos_070106_form_009_2.xsd @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4521f6c483c8eecaa0d5e9ebe17d0d38d25af260 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for elementFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_010 { + + import from schema_Pos_070106_form_010 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {myField := 2}, + myElement := {myField := 3} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_010.xml", { "Pos_070106_form_010.xsd", "Pos_070106_form_010_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml new file mode 100644 index 0000000000000000000000000000000000000000..463825980050dab2fe8c72378d75a50a16c88776 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xml @@ -0,0 +1,11 @@ + + + 1 + + 2 + + + 3 + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd new file mode 100644 index 0000000000000000000000000000000000000000..da2d32b4dfb80955f6f039c3aae3d7e2bf8bf616 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..375d9a50a84a3b29dc670a536be0aed303ef3a82 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_010/Pos_070106_form_010_2.xsd @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7852130905696597db6dc08599c0746b92af6fd1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for attributeFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_011 { + + import from schema_Pos_070106_form_011 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {2}, + myElement := {3} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_011() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_011.xml", { "Pos_070106_form_011.xsd", "Pos_070106_form_011_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml new file mode 100644 index 0000000000000000000000000000000000000000..d391957d41cc70380195521c118f51c56b8998f4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd new file mode 100644 index 0000000000000000000000000000000000000000..270421ae3eed3a9221d7c5b019a3c1761c2a2bca --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..167c68be6ea2d9cdb9238c389ffc165dbd10c8a7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_011/Pos_070106_form_011_2.xsd @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..41596a07c5138a307d01415b0bd1adc9f0a44c4d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 487, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.6, check correct namespace prefix encoding for attributeFormDefault + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070106_form_012 { + + import from schema_Pos_070106_form_012 language "XSD" all; + + template MyElement m_msg := { + myField := 1, + myField2 := {2}, + myElement := {3} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070106_form_012() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070106_form_012.xml", { "Pos_070106_form_012.xsd", "Pos_070106_form_012_2.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070106_form_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml new file mode 100644 index 0000000000000000000000000000000000000000..d0d8627a984b92752239463908cbf43b25b456ae --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd new file mode 100644 index 0000000000000000000000000000000000000000..890710f8187f344ed4e80bf7a1eebefdd5af8275 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd new file mode 100644 index 0000000000000000000000000000000000000000..edd09d1d9b1841b6c583f13df6b7d2e8ec66b7b9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070106_form/Pos_070106_form_012/Pos_070106_form_012_2.xsd @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..497736b6921938dc303ae6a216927273bc05124a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing global simpleType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of simpleType. + +module Pos_070107_type_001 { + + import from schema_Pos_070107_type_001 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_001.xml", { "Pos_070107_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..cfbe73611bb8c5a91cd5df67a5318d7a94fd5b22 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..68a59ebb0b1a1415b1cb12e17cba260f1e5d8c8a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_001/Pos_070107_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6c7e64c46759335907b87a8be281d2b0c8ab7eb3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing global complexType + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of complexType. + +module Pos_070107_type_002 { + + import from schema_Pos_070107_type_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := 2 + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_002.xml", { "Pos_070107_type_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d98cdae95d9a1ca4e29d8e1de680ef749ba5e4c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xml @@ -0,0 +1,5 @@ + + + foo + 2 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1681d69e782b85f1b13df850bcfd7f29d444d423 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_002/Pos_070107_type_002.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..638d46beea1ca8d12f749743000e67e4973eefcd --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.7, Verify conversion of type attribute referencing built-in type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD type attribute holds the type information of the XSD component. The +// value is a reference to the global definition of a built-in type. + +module Pos_070107_type_003 { + + import from schema_Pos_070107_type_003 language "XSD" all; + + template MyType m_msg := 5; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070107_type_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070107_type_003.xml", { "Pos_070107_type_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070107_type_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..a42c819a635eddf83555e1fe0e04b2ae52ef407c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0456e0be3e77e2e93fc42d67bbaca47ca465347c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070107_type/Pos_070107_type_003/Pos_070107_type_003.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..545d25c44a17d8f8fa05efde7d772bbcf87b6ca1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Simple nillable type (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_001 { + + import from schema_Pos_070111_nillable_001 language "XSD" all; + + template MyType m_msg := { + content := omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_001.xml", { "Pos_070111_nillable_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..aae38b4711b7c104192509a6fcd40cb044b09d1d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xml @@ -0,0 +1,2 @@ + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9eb5f44a6a7803dd5bccac81d5bf29e4181645f7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_001/Pos_070111_nillable_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..af1861b9c6959057e73c9af6ea0a92868a6040d3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Simple nillable type (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_002 { + + import from schema_Pos_070111_nillable_002 language "XSD" all; + + template MyType m_msg := { + content := "abc" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_002.xml", { "Pos_070111_nillable_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ddca6874d4fa91f14fa7d7c24af8a0798d49c93 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xml @@ -0,0 +1,2 @@ + +abc diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c2fdced4a7918f0e516d4c61f468d6ecc4fdf57c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_002/Pos_070111_nillable_002.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d1edcb8793c5b41675c9d122e18fdb6eea08253c --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of simple type inside sequence (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_003 { + + import from schema_Pos_070111_nillable_003 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := { + content := omit + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_003.xml", { "Pos_070111_nillable_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..6b1c5d9b82310b0b4fad1afa74f9a8a028259fc3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xml @@ -0,0 +1,5 @@ + + + 1 + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..887c224d052c9d84276d090a7a7ae8bd28dd14e8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_003/Pos_070111_nillable_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1f275dfd91db267f4f8308d535fae01dcf4505c1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of simple type inside sequence (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// A simple-type nillable XSD element shall be mapped to a TTCN-3 record type (in case of global +// elements) or field (in case of local elements), with the name resulted by applying clause 5.2.2 +// to the name of the corresponding element. The record type or field shall contain one optional +// field with the name "content" and its type shall be the TTCN 3 type of the element. The record +// type or field shall be appended with the "useNil" encoding instruction. + +module Pos_070111_nillable_004 { + + import from schema_Pos_070111_nillable_004 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := { + content := "abc" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_004.xml", { "Pos_070111_nillable_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..97e5890e977b9b07f3ca7180293362ae9b27765a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xml @@ -0,0 +1,5 @@ + + + 1 + abc + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..56fed89c44f36ff143f2c6056616800dea6a901e --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_004/Pos_070111_nillable_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dc691c13875da23b5a6361520f2bb8303dfe9197 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of complex type (nil option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// ComplexType XSD elements are mapped to an outer record type or field, according to clause 7.6 . +// When the nillable XSD attribute is allocated to such an element, the element components of the +// complex type shall be enframed by an extra optional TTCN-3 record field. I.e., the attributes +// of the complex-type element, mapped to a field of the outer record, shall not be the members +// of the inner record, generated for the nillable XSD attribute. The name of the inner record +// field shall be the result of applying clause 5.2.2 to the name "content". The outer record, +// corresponding to the complexType component of the nillable element, shall be appended with the +// "useNil" encoding instruction. + +module Pos_070111_nillable_005 { + + import from schema_Pos_070111_nillable_005 language "XSD" all; + + template MyType m_msg := { + bar := 1, + content := omit, + content_1 := omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_005.xml", { "Pos_070111_nillable_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..6580c98f01970ed7050f879389fd6ec2d9ac3972 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xml @@ -0,0 +1,2 @@ + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e048e2f88ac635f8e023b6547ee8e5cf3466cde1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_005/Pos_070111_nillable_005.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..063283940404089774b0244c654f1d0e45517420 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.1.11, Nillable element of complex type (value option) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// ComplexType XSD elements are mapped to an outer record type or field, according to clause 7.6 . +// When the nillable XSD attribute is allocated to such an element, the element components of the +// complex type shall be enframed by an extra optional TTCN-3 record field. I.e., the attributes +// of the complex-type element, mapped to a field of the outer record, shall not be the members +// of the inner record, generated for the nillable XSD attribute. The name of the inner record +// field shall be the result of applying clause 5.2.2 to the name "content". The outer record, +// corresponding to the complexType component of the nillable element, shall be appended with the +// "useNil" encoding instruction. + +module Pos_070111_nillable_006 { + + import from schema_Pos_070111_nillable_006 language "XSD" all; + + template MyType m_msg := { + bar := 1, + content := omit, + content_1 := { + foo := 25 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070111_nillable_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070111_nillable_006.xml", { "Pos_070111_nillable_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070111_nillable_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..f1b343711eb8087d0426b418b2018d68d9e182f1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xml @@ -0,0 +1,4 @@ + + + 25 + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3c019cef6ad859baab48077d589f2b90ccff4438 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070111_nillable/Pos_070111_nillable_006/Pos_070111_nillable_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7d199b0512087a8a5c0ccc198a2f02f95694b744 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neg_070112_use_001.ttcn @@ -0,0 +1,56 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with required use cannot be omitted + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// If the value of the use attribute is required, the TTCN-3 field corresponding +// to the XSD attribute shall be mandatory (i.e. without optional). + +module Neg_070112_use_001 { + + import from schema_Neg_070112_use_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := omit, + base := 5 + } + }; + + + + /** + * @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_070112_use_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_070112_use_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2edae896b030595b69c8521a0a1baed58976cf84 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Neg_070112_use_001/Neq_070112_use_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..06975ed89eed8dc269760ce1f71826f92f625bd7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with required use is correctly converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the use attribute is required, the TTCN-3 field corresponding +// to the XSD attribute shall be mandatory (i.e. without optional). + +module Pos_070112_use_001 { + + import from schema_Pos_070112_use_001 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := "attr", + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_001.xml", { "Pos_070112_use_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..1fd7c9c72ae4842b4a444b61071c7b2be9d452b8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4fd86d7fba2716deb45448de91bf57259f2f33d3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_001/Pos_070112_use_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7a45aa9fb196e5497c258f629a2d6dacc4a40ab --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with optional use is correctly converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the use attribute ... value is optional in an XSD attribute declaration, +// the TTCN-3 field resulted by the mapping of the corresponding attribute shall +// be optional. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070112_use_002 { + + import from schema_Pos_070112_use_002 language "XSD" all; + + template MyType m_msg := { + foo := { + attr := omit, + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_002.xml", { "Pos_070112_use_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..6be4b7049995c75376541f0ce48c84d8209c2bcc --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cdf57ac44de9acd28989fd74ef87b41acfc03339 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_002/Pos_070112_use_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d6d8b4853b2ec2df4af6057ab5c80f2585dd9a7a --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.12, Verify that attribute with prohibited use is not converted + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD attributes with the value of the use attribute prohibited shall not be +// translated to TTCN-3. + +module Pos_070112_use_003 { + + import from schema_Pos_070112_use_003 language "XSD" all; + + template MyType m_msg := { + foo := { + base := 5 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070112_use_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070112_use_003.xml", { "Pos_070112_use_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070112_use_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..065de3a92752b30f77aec712a611cd3861b735ef --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xml @@ -0,0 +1,4 @@ + + + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e15bd6dc978df448e13f2f24c5821e3e85b778ef --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070112_use/Pos_070112_use_003/Pos_070112_use_003.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d82d2495f0cb9d958723d61c0ff7a710801807f6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.1.14, Verify conversion of elements with final attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The final XSD attribute information item(s) shall produce no TTCN-3 language +// construct when translating an XML Schema to TTCN-3. + +module Pos_070114_final_001 { + + import from schema_Pos_070114_final_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070114_final_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070114_final_001.xml", { "Pos_070114_final_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070114_final_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c73369c3db7b3f9410b2ff945012bb2ccd42544d --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b8e22de234c304e32d0e9f1d239afb7eac2d1998 --- /dev/null +++ b/xml/07_mapping_xsd_components/0701_component_attributes/070114_final/Pos_070114_final_001/Pos_070114_final_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..82112fe4392e6150c9cf70223c2c9d854365d0ab --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of simple type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case of XSD datatypes, and simple types defined locally as child of the +// element, the type of the XSD element mapped to TTCN-3. + +module Pos_0703_element_component_001 { + + import from schema_Pos_0703_element_component_001 language "XSD" all; + + template MyType m_msg := "abc"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_001.xml", { "Pos_0703_element_component_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c8021582efc4aa50d82d6c57981a6ca1c802fd2c --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..de9eea688ea398958d23c7f96ec98e5f35cde059 --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_001/Pos_0703_element_component_001.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d5582fa8be4d352887e6e1de58e94e2eed408f48 --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of user defined type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case of XSD user-defined types referenced by the type attribute of the +// element, the TTCN-3 type generated for the referenced XSD type. + +module Pos_0703_element_component_002 { + + import from schema_Pos_0703_element_component_002 language "XSD" all; + + template MyBaseType m_typeBased := 1; + template MyType m_msg := m_typeBased; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_002.xml", { "Pos_0703_element_component_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..9c0e1f17ed7b2d013d68bb793f660263b756381b --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1b57ff753d6f9c04d4e082adf4685f3fc041bf2e --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_002/Pos_0703_element_component_002.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7485685f9725ab005f880ad23a20fffeebcde53c --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of global element of locally defined complex type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In case the child of the element is a locally defined complexType, it shall +// be a TTCN-3 record. + +module Pos_0703_element_component_003 { + + import from schema_Pos_0703_element_component_003 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_003.xml", { "Pos_0703_element_component_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..9c63bed59f3f90ab96d1796f9ad2438d2ac8fe6d --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9ae08664f487bae353c79aa11ab32044a39f58d8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_003/Pos_0703_element_component_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e5655b4aa0b439a6c4194d8b54355929cb45d54b --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.3, Verify conversion of local elements defined by reference with different namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When a local element is defined by reference (the ref attribute is used) and +// the target namespace of the XSD Schema in which the referenced element is +// defined differs from the target namespace of the referencing XSD Schema +// (including the no target namespace case), the TTCN-3 field generated for this +// element reference shall be appended with a "namespace as" encoding +// instruction (see clause B.3.1), which shall identify the namespace and +// optionally the prefix of the XSD schema in which the referenced entity is +// defined. + +module Pos_0703_element_component_004 { + + import from schema_Pos_0703_element_component_004 language "XSD" all; + + template MyType m_msg := { + imported := "abc" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0703_element_component_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0703_element_component_004.xml", { "Pos_0703_element_component_004.xsd", "Pos_0703_element_component_004_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0703_element_component_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..41ce901875c59c05af161a8b768d4bdcb4b8a1b6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..212696df07e46c19c546d237576ef3b16037b7b4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..49bf3b4216ba7d8ea871f692d75e90250dbfe65a --- /dev/null +++ b/xml/07_mapping_xsd_components/0703_element_component/Pos_0703_element_component_004/Pos_0703_element_component_004_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24398d10b106e23910637446baddbfb493d02a65 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.1, Verify mapping of a globally defined attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070401_attribute_element_definitions_001 { + + import from schema_Pos_070401_attribute_element_definitions_001 language "XSD" all; + + template E1 m_msg := {a1:="test", elem := "test1234"}; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070401_attribute_element_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070401_attribute_element_definitions_001.xml", { "Pos_070401_attribute_element_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070401_attribute_element_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..df16e1ffde2cccbd8e91d95855546ebaf6ebc05a --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml @@ -0,0 +1,6 @@ + + + test1234 + diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3513c2e54b9e0d0680189ef3b28c9015d916ae67 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c930f8da837ea0fd6cdb417f4242582a7a623f3f --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.2, Verify mapping of a globally defined attribute group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070402_attribute_group_definitions_001 { + + import from schema_Pos_070402_attribute_group_definitions_001 language "XSD" all; + + template E1 m_msg := { + fgroup := 10.0, + igroup := 10, + sgroup := "text", + elem := "text1234" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070402_attribute_group_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070402_attribute_group_definitions_001.xml", { "Pos_070402_attribute_group_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070402_attribute_group_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..908c8c6725ebc0c3eca8057c72968d7b9e0bf75e --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml @@ -0,0 +1,6 @@ + + + text1234 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7b79baf2737ab9ce318731ba20286fc0f6af9486 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_and_attribute_group_definitions/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24398d10b106e23910637446baddbfb493d02a65 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.1, Verify mapping of a globally defined attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070401_attribute_element_definitions_001 { + + import from schema_Pos_070401_attribute_element_definitions_001 language "XSD" all; + + template E1 m_msg := {a1:="test", elem := "test1234"}; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070401_attribute_element_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070401_attribute_element_definitions_001.xml", { "Pos_070401_attribute_element_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070401_attribute_element_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a0804d81f9dd25e23b4830f1d88e8610ec59404 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xml @@ -0,0 +1,6 @@ + + + test1234 + diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3513c2e54b9e0d0680189ef3b28c9015d916ae67 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070401_attribute_element_definitions/Pos_070401_attribute_element_definitions_001/Pos_070401_attribute_element_definitions_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c930f8da837ea0fd6cdb417f4242582a7a623f3f --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.4.2, Verify mapping of a globally defined attribute group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070402_attribute_group_definitions_001 { + + import from schema_Pos_070402_attribute_group_definitions_001 language "XSD" all; + + template E1 m_msg := { + fgroup := 10.0, + igroup := 10, + sgroup := "text", + elem := "text1234" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070402_attribute_group_definitions_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070402_attribute_group_definitions_001.xml", { "Pos_070402_attribute_group_definitions_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070402_attribute_group_definitions_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..cdd95b1bedf40d3c322f588df79a70d920555362 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xml @@ -0,0 +1,6 @@ + + + text1234 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7b79baf2737ab9ce318731ba20286fc0f6af9486 --- /dev/null +++ b/xml/07_mapping_xsd_components/0704_attribute_defs/070402_attribute_group_definitions/Pos_070402_attribute_group_definitions_001/Pos_070402_attribute_group_definitions_001.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f4625912620e133009eb0a67539b0573d0c032d4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that it is possible to convert anonymous + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// It is also possible in XSD to restrict an anonymous simple type. The translation +// follows the mapping for built-in data types, but instead of using the base +// attribute to identify the type to apply the facet to, the base attribute type +// shall be omitted and the type of the inner, anonymous simpleType shall be used. +module Pos_070501_derivation_by_restriction_001 { + + import from schema_Pos_070501_derivation_by_restriction_001 language "XSD" all; + + template MyType m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070501_derivation_by_restriction_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070501_derivation_by_restriction_001.xml", { "Pos_070501_derivation_by_restriction_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070501_derivation_by_restriction_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d723d68f3819a5342431c3daa098c8f933e6a1c0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a515aaf72b48076db69996fdd362cf35bc3808d0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_001/Pos_070501_derivation_by_restriction_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5f2e55b0d8a3a559d6b739cd6678e1eb097a3cec --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that it is possible to convert anonymous + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// It is also possible in XSD to restrict an anonymous simple type. The translation +// follows the mapping for built-in data types, but instead of using the base +// attribute to identify the type to apply the facet to, the base attribute type +// shall be omitted and the type of the inner, anonymous simpleType shall be used. +module Pos_070501_derivation_by_restriction_002 { + + import from schema_Pos_070501_derivation_by_restriction_002 language "XSD" all; + + template Elem_simple_restr m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070501_derivation_by_restriction_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070501_derivation_by_restriction_002.xml", { "Pos_070501_derivation_by_restriction_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070501_derivation_by_restriction_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..7a8d165f52f397e18a96eb28c67132c1e4d5e7ef --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xml @@ -0,0 +1,2 @@ + +1 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0b898b57cddb109de3072f4e37164e1caaf2e594 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070501_derivation_by_restriction/Pos_070501_derivation_by_restriction_002/Pos_070501_derivation_by_restriction_002.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2a0d84a8c8019fd837038cf283606b30139895a1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify length constraint imposed on type derived by list + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// When using any of the supported XSD facets (length, maxLength, minLength) the +// translation shall follow the mapping for built-in list types, with the difference +// that the base type shall be determined by an anonymous inner list item type. +module Neg_070502_derivation_by_list_001 { + + import from schema_Neg_070502_derivation_by_list_001 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070502_derivation_by_list_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070502_derivation_by_list_001.xml", { "Neg_070502_derivation_by_list_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070502_derivation_by_list_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ad8f71120f240e8d5eaba9176f634eaf17863ae1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_001/Neg_070502_derivation_by_list_001.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1146e33edfcef0815f62f3859a4f336918166836 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify constraint imposed on inner type defined inside XSD list + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Neg_070502_derivation_by_list_002 { + + import from schema_Neg_070502_derivation_by_list_002 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh", "ij" }; // "ij" contains only two characters + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070502_derivation_by_list_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070502_derivation_by_list_002.xml", { "Neg_070502_derivation_by_list_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070502_derivation_by_list_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c7d4777ae4702c7bc58bfca25ddfb708894cc80f --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Neg_070502_derivation_by_list_002/Neg_070502_derivation_by_list_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dec381a9a65f52225d43389714acbd4e5491679f --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify that derivation by list is converted to record of + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// XSD list components shall be mapped to the TTCN-3 record of type. In their +// simplest form lists shall be mapped by directly using the listItem attribute +// as the resulting type. +module Pos_070502_derivation_by_list_001 { + + import from schema_Pos_070502_derivation_by_list_001 language "XSD" all; + + template MyType m_msg := { 1.0, 2.0, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_001.xml", { "Pos_070502_derivation_by_list_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe6d7050c427d317f28b74c2052e83316a2e976a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.0 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c8db999771d7cad7888e503c2fa64250826ff168 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_001/Pos_070502_derivation_by_list_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8d8a4ae4ebc6964aa67dffa790943d8ed5762259 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify mapping of facets connected applied to derivation by list + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When using any of the supported XSD facets (length, maxLength, minLength) the +// translation shall follow the mapping for built-in list types, with the difference +// that the base type shall be determined by an anonymous inner list item type. +module Pos_070502_derivation_by_list_002 { + + import from schema_Pos_070502_derivation_by_list_002 language "XSD" all; + + template MyType m_msg := {1.0, 2.0, 3.14 }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_002.xml", { "Pos_070502_derivation_by_list_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..0011230a6cbc7b12b0c2b8f841b980de92b15d05 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.14 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b4f72f7f80eae5b52d1bf15dbe0711842a7d87c4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_002/Pos_070502_derivation_by_list_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..77ddaad68262cc3e9ac93c89c17c21a2139bfc90 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify conversion of facets defined inside XSD list + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Pos_070502_derivation_by_list_003 { + + import from schema_Pos_070502_derivation_by_list_003 language "XSD" all; + + template MyType m_msg := { "abcd", "efgh", "ijkl" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_003.xml", { "Pos_070502_derivation_by_list_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..c9ed400386b043da350971cbfb6d28c18170ce0d --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xml @@ -0,0 +1,2 @@ + +abcd efgh ijkl \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fbb3990b1ee988b98c0c2c8e968877facd26bd87 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_003/Pos_070502_derivation_by_list_003.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..00687b9f6ff1126957239c224b5ad0ff2b2eb8f2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify transformation of derivation by list with enumerated facets inside + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The other XSD facets shall be mapped accordingly (refer to respective 6.1 clauses). +// If no itemType is given, the mapping has to be implemented using the given inner +// type (see clause 7.5.3). +module Pos_070502_derivation_by_list_004 { + + import from schema_Pos_070502_derivation_by_list_004 language "XSD" all; + + template MyType m_msg := { orange, blue }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_004.xml", { "Pos_070502_derivation_by_list_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..bf72d9252560d3585299c8af94802506c5d9cc1a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xml @@ -0,0 +1,2 @@ + +Orange Blue \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a1d60459140cde01ee259d3db367e9b084790f42 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_004/Pos_070502_derivation_by_list_004.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..68deb265875b2dc53a28e5f93e34d67aa43b3c5b --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.2, Verify transformation of list containing union content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070502_derivation_by_list_005 { + + import from schema_Pos_070502_derivation_by_list_005 language "XSD" all; + + template MyType m_msg := { { alt_ := true }, { alt_1 := 2.0 }, { alt_ := false } }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070502_derivation_by_list_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070502_derivation_by_list_005.xml", { "Pos_070502_derivation_by_list_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070502_derivation_by_list_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..b814a6f5298926c36b2a4e549a1f2c91dd8fa36d --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xml @@ -0,0 +1,2 @@ + +true 2.0 false \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..487664fe9dff005fc6051897bcffe8232db8ad2b --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070502_derivation_by_list/Pos_070502_derivation_by_list_005/Pos_070502_derivation_by_list_005.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1326d16581bb4192836c2e186f56239a05f53ec0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ... . +module Pos_070503_derivation_by_union_001 { + + import from schema_Pos_070503_derivation_by_union_001 language "XSD" all; + + template MyType m_msg := { integer_ := 5 }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_001.xml", { "Pos_070503_derivation_by_union_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..2987b08bf9ca963b4f44719bf68c66f0a3f03ddd --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7b6aeb1cc52e2e35101e730e3e26b5920ed31719 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_001/Pos_070503_derivation_by_union_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b811cef98bfc12aae9dda87a4151456a6934601b --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.5.3, Verify transformation of union with unnamed member types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 ... to the string "alt" (in case of unnamed member types). +module Pos_070503_derivation_by_union_002 { + + import from schema_Pos_070503_derivation_by_union_002 language "XSD" all; + + template MyType m_msg := { alt_ := 1.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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_002.xml", { "Pos_070503_derivation_by_union_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5d1e3cdd576e10a566f000af208c0597461a1bf --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xml @@ -0,0 +1,2 @@ + +1.0 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7ac1c5f53d10750a5c37b4e713a7602d08ace11a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_002/Pos_070503_derivation_by_union_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4a009541e7e6e676490f6d321e42d11f58d7763d --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute and unnamed member types + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ) or to the string "alt" (in case +// of unnamed member types). +module Pos_070503_derivation_by_union_003 { + + import from schema_Pos_070503_derivation_by_union_003 language "XSD" all; + + template MyType m_msgTest := { time := "14:35:21" }; + template MyType m_msg := { alt_ := "2014-04-24" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_003.xml", { "Pos_070503_derivation_by_union_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..f67ca9815c07c5b2d68b34ad9be221e917722c36 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xml @@ -0,0 +1,2 @@ + +2014-04-24 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7a6b780ef4dd35910863cee19fc3c15787b90efe --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_003/Pos_070503_derivation_by_union_003.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..21a992517068eb30d99c6f3db28c4707b5ecbde7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union with memberTypes attribute and unnamed enumeration + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD union is considered as a set of mutually exclusive alternative types for +// a simpleType. As this is compatible with the union type of TTCN-3, a simpleType +// derived by union in XSD shall be mapped to a union type definition in TTCN-3. The +// generated TTCN-3 union type shall contain one alternative for each member type of +// the XSD union, preserving the textual order of the member types in the initial XSD +// union type. The field names of the TTCN-3 union type shall be the result of applying +// clause 5.2.2 to either to the unqualified name of the member type (in case of built +// in XSD data types and user defined named types) ) or to the string "alt" (in case +// of unnamed member types). +module Pos_070503_derivation_by_union_004 { + + import from schema_Pos_070503_derivation_by_union_004 language "XSD" all; + + template MyType m_msgTest := { nonNegativeInteger := 5 }; + template MyType m_msg := { alt_ := unbounded }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_004.xml", { "Pos_070503_derivation_by_union_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..86602c1888ce3226592a2f530414c70dac75b605 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xml @@ -0,0 +1,2 @@ + +unbounded \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..47c3fbe335a2e4dd5af85e459528fa227664a871 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_004/Pos_070503_derivation_by_union_004.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4a4fd544c773363a32efb14bb8e58cb4f4ef6192 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union content containing enumeration facets + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_005 { + + import from schema_Pos_070503_derivation_by_union_005 language "XSD" all; + + template MyType m_msg := { alt_2 := "small" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_005.xml", { "Pos_070503_derivation_by_union_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..75e5fde5e8a87746713869669f0666ccf9700a1a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xml @@ -0,0 +1,2 @@ + +small \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0550355e8b836976777e4399727233da5b994e6a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_005/Pos_070503_derivation_by_union_005.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dc53e6ea753a781b9658c1e1a059ac463a6ba670 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union containing list content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_006 { + + import from schema_Pos_070503_derivation_by_union_006 language "XSD" all; + + template MyType m_msg := { alt_1 := { 1.0, 2.0, 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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_006.xml", { "Pos_070503_derivation_by_union_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf583511090b11a3be9650b46ebfbcd01bb290f8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xml @@ -0,0 +1,2 @@ + +1.0 2.0 3.0 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..78ebcab07297bd79cb1bfedea5db35440199d91f --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_006/Pos_070503_derivation_by_union_006.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..246bb6b7bddc57ca55b9f3226fd84a843ee5e082 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union restricted by enum facets (anonymous union members) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_007 { + + import from schema_Pos_070503_derivation_by_union_007 language "XSD" all; + + template MyType m_msg := { xsiType := alt_, content := x20 }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_007.xml", { "Pos_070503_derivation_by_union_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..bb6efe6121cba36aee20824234159fd4186680a8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xml @@ -0,0 +1,2 @@ + +20 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..56318915a060285e0d002c796d3ec7008b46be58 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_007/Pos_070503_derivation_by_union_007.xsd @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..296dcf74391b9adf07616c9720485501c532af04 --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.ttcn @@ -0,0 +1,81 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.5.3, Verify transformation of union restricted by enum facets (referenced union members) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +module Pos_070503_derivation_by_union_008 { + + import from schema_Pos_070503_derivation_by_union_008 language "XSD" all; + + template MyType m_msg := { xsiType := integer_, content := x20 }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070503_derivation_by_union_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070503_derivation_by_union_008.xml", { "Pos_070503_derivation_by_union_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070503_derivation_by_union_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml new file mode 100644 index 0000000000000000000000000000000000000000..cd2d07c7241f3cbab667131d81115320dceb016a --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xml @@ -0,0 +1,2 @@ + +20 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3fe6dd114c2548361694636761b44561c0c9ccdf --- /dev/null +++ b/xml/07_mapping_xsd_components/0705_simpletype_components/070503_derivation_by_union/Pos_070503_derivation_by_union_008/Pos_070503_derivation_by_union_008.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..331e4d5a1cd8bfe66e2fe31f33e00f80bc1da383 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.ttcn @@ -0,0 +1,82 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.1, Verify extension of a built-in type by adding an attribute + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060101_extending_simple_content_001 { + + import from schema_Pos_07060101_extending_simple_content_001 language "XSD" all; + + template E23el m_msg := {bar := 1, foo := 2.0, base := "something"} + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060101_extending_simple_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060101_extending_simple_content_001.xml", { "Pos_07060101_extending_simple_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060101_extending_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..6b8df4f18d8d63d81fe8b5104f00eecccd9bbf39 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xml @@ -0,0 +1,4 @@ + +something diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ec04b694e60e75d09bfad3e7f471ec0583a13642 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_001/Pos_07060101_extending_simple_content_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9a9a118f9d8c410d22e01532d69fb10729b9a415 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.1.1, Verify extension without changing the base creates a synonym type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base +// of the extension without changing the base type (i.e. no facet is applied and no attribute is added), it +// shall be translated to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with +// necessary additional encoding instructions (see section 7.6 rule 1). + +// NOTE: revision required after CR7656 is resolved + +module Pos_07060101_extending_simple_content_002 { + + import from schema_Pos_07060101_extending_simple_content_002 language "XSD" all; + + template Elem_complex_ext_simple m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060101_extending_simple_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060101_extending_simple_content_002.xml", { "Pos_07060101_extending_simple_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060101_extending_simple_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..8780f201d9efc8b83a3ae04354c0031140e63345 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xml @@ -0,0 +1,3 @@ + +1 diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d24ec37b8056ad822d135baf9e688ec139b1093f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060101_extending_simple_content/Pos_07060101_extending_simple_content_002/Pos_07060101_extending_simple_content_002.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0c2c405f289cfa917ba1c2e275ef759187626c9e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.ttcn @@ -0,0 +1,50 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify restriction of a base type + ** @verdict pass reject + ***************************************************/ +module Neg_07060102_restricting_simple_content_001 { + + import from schema_Neg_07060102_restricting_simple_content_001 language "XSD" all; + + template E1 m_msg := { + bar := 1, + foo := 2.0, + base := "someone" //error because of length 4 + } + + + + /** + * @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_07060102_restricting_simple_content_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_07060102_restricting_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b6be7b64154aed0b2df5ba33deef1374f827c724 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Neg_07060102_restricting_simple_content_001/Neg_07060102_restricting_simple_content_001.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..46c53b5bdf51a754d3ea4b2bbfd2e62d217cfa93 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.ttcn @@ -0,0 +1,86 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify restriction of a base type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060102_restricting_simple_content_001 { + + import from schema_Pos_07060102_restricting_simple_content_001 language "XSD" all; + + /*template E1 m_msg := { + bar := 1, + foo := 2.0, + base := "some" + }*/ + + template E1 m_msg := {bar := 1, foo := 2.0, base := "some"} + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060102_restricting_simple_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060102_restricting_simple_content_001.xml", { "Pos_07060102_restricting_simple_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060102_restricting_simple_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8bec1b68d1164af515065d92a5a8fb8bcaf1a1b9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xml @@ -0,0 +1,4 @@ + +some \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ee18446086cdc00cfff5cba5b5eaf74392aa07fc --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_001/Pos_07060102_restricting_simple_content_001.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5e92d06be5dc8fe56d40899b18361fd55178ed19 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.1.2, Verify that a synonym type is created for restriction with no base type change + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base of +// the restriction without changing the base type (i.e. no facet is applied), it shall be translated to a TTCN-3 +// type synonym to the base type (see clause 6.4 of [1]), completed with necessary additional encoding +// instructions (see section 7.6 rule 1). + +// NOTE: revision required after CR7656 is resolved + +module Pos_07060102_restricting_simple_content_002 { + + import from schema_Pos_07060102_restricting_simple_content_002 language "XSD" all; + + template Elem_complex_restr_simple m_msg := 1; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060102_restricting_simple_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060102_restricting_simple_content_002.xml", { "Pos_07060102_restricting_simple_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060102_restricting_simple_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..e88861011426654394336b2a1d4c65f4287a82b8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xml @@ -0,0 +1,3 @@ + +1 \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b5b032966e1382a0f18baeb15c1133fa358fc1e0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070601_simple_content/07060102_restricting_simple_content/Pos_07060102_restricting_simple_content_002/Pos_07060102_restricting_simple_content_002.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4241eb3fe56b632a60eba5477596e1fb115f0dfc --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.ttcn @@ -0,0 +1,125 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_001 { + + import from schema_Pos_07060201_derived_by_extension_001 language "XSD" all; + //template for EXAMPLE1 and following type system shall be generated from xsd file: + /*type record E1 + { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.String birthDateAttrGroup optional, + XSD.String birthPlaceAttrGroup optional, + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by fields corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // finally fields corresponding to the extending element and group reference + XSD.Integer ageElemExt, + G25seq g25seq + } + with { + variant "name as uncapitalized "; + variant (birthDateAttrGroup, birthPlaceAttrGroup, genderAttrBase, jobPositionAttrGroup,unitOfAge) "attribute"; + }; + + type record G25seq { + XSD.String familyStatusElemInGroup, + XSD.String spouseElemInGroup optional + } + with { + variant "untagged" + }*/ + + template E1 m_msg := { + birthDateAttrGroup := omit, + birthPlaceAttrGroup := omit, + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase1", + forenameElemBase := "forenameElemBase2", + surnameElemBase := "surnameElemBase3", + ageElemExt := 1, + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup4", + spouseElemInGroup := omit + } + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_001.xml", { "Pos_07060201_derived_by_extension_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..048b340fd4d70a417876aceb4827977224bde3e8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xml @@ -0,0 +1,10 @@ + + + titleElemBase1 + forenameElemBase2 + surnameElemBase3 + 1 + familyStatusElemInGroup4 + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f05003b5bb2e98c12bae16e89b9502c9baf633d3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_001/Pos_07060201_derived_by_extension_001.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e93642d4ea8389d14fcfad2a0bb2847e0076d44a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.ttcn @@ -0,0 +1,120 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_002 { + + import from schema_Pos_07060201_derived_by_extension_002 language "XSD" all; + // template for EXAMPLE 2: type element e26seqReccurrence and one value of sequence_list + // and following type system shall be generated from xsd file: + /* + type record E1 { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a "simple" field list corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // the extending sequence is recurring (see clause 7.6.6.6 for the mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list + } + with { + variant "name as uncapitalized"; + variant(sequence_list) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase", + sequence_list := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_002.xml", { "Pos_07060201_derived_by_extension_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..7529cee01fea88288b041a0fe3d79c1cb04ed348 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xml @@ -0,0 +1,9 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5f8f94d25a29b1d15400094385cc9f8a54e02bbb --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_002/Pos_07060201_derived_by_extension_002.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..22bfc87b75cf1c969f9e58f8dba0c74e2b354674 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.ttcn @@ -0,0 +1,129 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_003 { + + import from schema_Pos_07060201_derived_by_extension_003 language "XSD" all; + // template for EXAMPLE 2: type element e26seqDoubleRecurrence and one value of sequence_list and sequence_list_1 + // and following type system shall be generated from xsd file: + /* + type record E26seqDoubleRecurrence { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a record of record field containing the fields corresponding to elements of + // the base type; the base type is a recurring sequence (see clause + // 7.6.6.6 for the + // mapping) + record of record { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } sequence_list, + // the extending sequence is recurring too(see clause + // 7.6.6.6 for the + // mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list_1 + } + with { + variant "name as uncapitalized"; + variant(sequence_list, sequence_list_1) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + sequence_list := {{ + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase" + }}, + sequence_list_1 := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_003.xml", { "Pos_07060201_derived_by_extension_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..1eb7c0055894ba6a582403a7ff2940f6492b9fbb --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xml @@ -0,0 +1,9 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8916eed9f725388caf55429c9d9cc4f0bd226716 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_003/Pos_07060201_derived_by_extension_003.xsd @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..95c6b5b3c780abf1409300ec47a7c238d5a5b998 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.ttcn @@ -0,0 +1,130 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_004 { + + import from schema_Pos_07060201_derived_by_extension_004 language "XSD" all; +// template for EXAMPLE 2: type element e26seqReccurrence and two records of sequence_list + // and following type system shall be generated from xsd file: + /* + type record E1 { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a "simple" field list corresponding to elements of the base type + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + // the extending sequence is recurring (see clause 7.6.6.6 for the mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list + } + with { + variant "name as uncapitalized"; + variant(sequence_list) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + + */ + + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase", + sequence_list := { + { + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }, + { + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup2", + spouseElemInGroup := omit + }, + ageElemExt := 2 + } + } + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_004.xml", { "Pos_07060201_derived_by_extension_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..263c2596323366d5b61a142e2ffae088febba0e1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xml @@ -0,0 +1,11 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + familyStatusElemInGroup + 1 + familyStatusElemInGroup2 + 2 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..85eebf8f8131825f39ccb9ace087aa2cd3002d9e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_004/Pos_07060201_derived_by_extension_004.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c98311dbe07e5915b669c2720699c776e63a7a5f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.ttcn @@ -0,0 +1,136 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and the + ** extending types have the compositor sequence and multiple occurrences + ** are allowed. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_005 { + + import from schema_Pos_07060201_derived_by_extension_005 language "XSD" all; + // template for EXAMPLE 2: type element e26seqDoubleRecurrence and two records of sequence_list and one sequence_list_1 + // and following type system shall be generated from xsd file: + /* + type record E26seqDoubleRecurrence { + // fields corresponding to attributes of the base and the extending type + // (in alphabetical order) + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitOfAge optional, + // followed by a record of record field containing the fields corresponding to elements of + // the base type; the base type is a recurring sequence (see clause + // 7.6.6.6 for the + // mapping) + record of record { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } sequence_list, + // the extending sequence is recurring too(see clause + // 7.6.6.6 for the + // mapping) + record of record { + G25seq g25seq + XSD.Integer ageElemExt, + } sequence_list_1 + } + with { + variant "name as uncapitalized"; + variant(sequence_list, sequence_list_1) "untagged"; + variant (genderAttrBase, jobPositionAttrGroup, unitOfAge) "attribute" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitOfAge := omit, + sequence_list := { + { + titleElemBase := "titleElemBase", + forenameElemBase := "forenameElemBase", + surnameElemBase := "surnameElemBase" + }, + { + titleElemBase := "titleElemBase1", + forenameElemBase := "forenameElemBase1", + surnameElemBase := "surnameElemBase1" + } + }, + sequence_list_1 := {{ + g25seq :={ + familyStatusElemInGroup :="familyStatusElemInGroup", + spouseElemInGroup := omit + }, + ageElemExt := 1 + }} + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_005.xml", { "Pos_07060201_derived_by_extension_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..0cd95e7cb061ecc1ad622e2f02c4b31c25a778f7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xml @@ -0,0 +1,12 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + titleElemBase1 + forenameElemBase1 + surnameElemBase1 + familyStatusElemInGroup + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..361be2bd78f366936eef5123dd60dd5456950e7c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_005/Pos_07060201_derived_by_extension_005.xsd @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b251345277c227b39fc0d3a66c50d8016fbba892 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.ttcn @@ -0,0 +1,111 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where both the base and + ** the extending types have the compositor choice + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_006 { + + import from schema_Pos_07060201_derived_by_extension_006 language "XSD" all; + // template for EXAMPLE 3: type element e26cho + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String genderAttrBase optional, + XSD.String unitAttrExt optional, + union { + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } choice, + union { + XSD.Integer ageElemExt + XSD.Date birthdayElemExt + } choice_1 + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, unitAttrExt) "attribute"; + variant(choice, choice_1) "untagged" + } + */ + template E1 m_msg := { + genderAttrBase := omit, + unitAttrExt := omit, + choice := { + surnameElemBase := "surnameElemBase" + }, + choice_1 :={ + ageElemExt := 10 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_006.xml", { "Pos_07060201_derived_by_extension_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..7c1ddd2d3a52c56f93d812a158fac0f44f245de4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xml @@ -0,0 +1,6 @@ + + + surnameElemBase + 10 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..672bbe8dfbf232501db32456fd342aa22fccc338 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_006/Pos_07060201_derived_by_extension_006.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a068d6c7f6a6326145e009a1a545df4b804ca70b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.ttcn @@ -0,0 +1,113 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type where extension of a sequence + ** base type by a choice model group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_007 { + + import from schema_Pos_07060201_derived_by_extension_007 language "XSD" all; + // template for EXAMPLE 4: type element e27cho + // and following type system shall be generated from xsd file: + /* + type record E1 + { + XSD.Integer genderAttrBase optional, + XSD.String jobPositionAttrGroup optional, + XSD.String unitAttrExt optional, + XSD.String titleElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase, + union { + XSD.Integer ageElemExt, + XSD.Date birthdayElemExt + } choice + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, jobPositionAttrGroup, unitAttrExt) "attribute"; + variant(choice) "untagged" + } + */ + + template E1 m_msg := { + genderAttrBase := omit, + jobPositionAttrGroup := omit, + unitAttrExt := omit, + titleElemBase :="titleElemBase", + forenameElemBase :="forenameElemBase", + surnameElemBase :="surnameElemBase", + choice := { + ageElemExt := 10 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_007.xml", { "Pos_07060201_derived_by_extension_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..62066ba2984eb70405f677440ed3d8dc9226aa94 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xml @@ -0,0 +1,10 @@ + + + titleElemBase + forenameElemBase + surnameElemBase + + 10 + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a796d6e3914ab1b408b73a263b799f04cb086ae8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_007/Pos_07060201_derived_by_extension_007.xsd @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..42cb60472c4bcb0f9911d6e1ef56f584417593e5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.ttcn @@ -0,0 +1,108 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify mapping of complex type: + ** extending of a base type with choice model group by a sequence model group + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_008 { + + import from schema_Pos_07060201_derived_by_extension_008 language "XSD" all; + // template for EXAMPLE 5: type element e27seq + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String genderAttrBase optional, + XSD.String unitAttrExt optional, + union { + XSD.String ElemBase, + XSD.String forenameElemBase, + XSD.String surnameElemBase + } choice, + XSD.Integer ageElemExt + } + with { + variant "name as uncapitalized"; + variant(genderAttrBase, unitAttrExt) "attribute"; + variant(choice) "untagged"; + } + */ + + template E1 m_msg := { + genderAttrBase := "genderAttrBase", + unitAttrExt := omit, + choice := { + surnameElemBase := "surnameElemBase" + }, + ageElemExt := 10 + + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_008.xml", { "Pos_07060201_derived_by_extension_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml new file mode 100644 index 0000000000000000000000000000000000000000..55b6d40d634018c51d045abd689405feb0d5bfb7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xml @@ -0,0 +1,10 @@ + + + + surnameElemBase + + + 10 + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd new file mode 100644 index 0000000000000000000000000000000000000000..54d7b190ed7c24d6dacc44ce67403871ed42655a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_008/Pos_07060201_derived_by_extension_008.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d5ec911a0a95396e7d321a0cb789c382a3e6740a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.ttcn @@ -0,0 +1,101 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:7.6.2.1, Verify mapping of complex type: + ** Recursive extension of an anonymous inner type is realized + ** using the TTCN-3 dot notation (starts from the name of the outmost type) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060201_derived_by_extension_009 { + + import from schema_Pos_07060201_derived_by_extension_009 language "XSD" all; + // template for EXAMPLE 6: type element X + // and following type system shall be generated from xsd file: + /* + type record E1 { + XSD.String x, + record { + XSD.String x, + E1.y y optional, + XSD.String z + } y optional + } + */ + + template E1 m_msg := { + x := "x", + y := { + x := "x1", + y := omit, + z := "z1" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_009.xml", { "Pos_07060201_derived_by_extension_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml new file mode 100644 index 0000000000000000000000000000000000000000..753fb4302b8424e0b9ceaba60841f3532b165ef0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xml @@ -0,0 +1,13 @@ + + + x + + + x1 + + z1 + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd new file mode 100644 index 0000000000000000000000000000000000000000..26e0d621b6461d2530d3e807b89ff4f1424cd3d6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_009/Pos_07060201_derived_by_extension_009.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8af180c5ce07bba73f94bff18074c42b6e26a81b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.2.1, Verify that a complex content derived by extension with no change is mapped to a synonym type + ** extending types have the compositor sequence. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another simple or complex type as the base of +// the extension without changing the base type (i.e. no facet is applied and no element or attribute is added), +// it shall be translated to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with +// necessary additional encoding instructions (see section 7.6 rule 1). + +module Pos_07060201_derived_by_extension_010 { + + import from schema_Pos_07060201_derived_by_extension_010 language "XSD" all; + + template Elem_complex_ext_complex m_msg := { + attr := 23, + int := 1, + str := "xyz" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060201_derived_by_extension_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060201_derived_by_extension_010.xml", { "Pos_07060201_derived_by_extension_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060201_derived_by_extension_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml new file mode 100644 index 0000000000000000000000000000000000000000..2809cc50d77b6f3384e81c924807fa152499b947 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xml @@ -0,0 +1,8 @@ + + + 1 + xyz + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d539635cdaf9a98d6afc27e8b376f44558856948 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060201_derived_by_extension/Pos_07060201_derived_by_extension_010/Pos_07060201_derived_by_extension_010.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3eefcc0b623d862766b17f4f80c5775f9b612107 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.2.2, Verify mapping of complex content derived by restriction: + ** AnyType is used as the base type and it is restricted to only two elements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_07060202_derived_by_restriction_001 { + + import from schema_Pos_07060202_derived_by_restriction_001 language "XSD" all; + + template E1 m_msg := { + size := -200, + unit:= "string" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060202_derived_by_restriction_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060202_derived_by_restriction_001.xml", { "Pos_07060202_derived_by_restriction_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060202_derived_by_restriction_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f4733cf28928995b088f2184e1df694b040c457 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xml @@ -0,0 +1,6 @@ + + + -200 + string + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..396e5612ce586bb3131bcf13951f7fd0fdf50674 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_001/Pos_07060202_derived_by_restriction_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b17ac69153641ef2e05cc9663469c9703e04108 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 Verify that a complex content derived by restriction with no change is mapped to a synonym type + ** @purpose 9:7.6.2.2, + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// If the definition of a new named or unnamed complex type uses another complex type as the base of +// the restriction without changing the base type (i.e. no facet is present), it shall be translated +// to a TTCN-3 type synonym to the base type (see clause 6.4 of [1]), completed with necessary +// additional encoding instructions (see section 7.6. rule 1). + +module Pos_07060202_derived_by_restriction_002 { + + import from schema_Pos_07060202_derived_by_restriction_002 language "XSD" all; + + template Elem_complex_restr_complex m_msg := {} + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060202_derived_by_restriction_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060202_derived_by_restriction_002.xml", { "Pos_07060202_derived_by_restriction_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060202_derived_by_restriction_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f5549256571cb2bddcf359fd93e8e60d627a8c3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xml @@ -0,0 +1,3 @@ + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..249809559e5f199d0e7ad5ce23c18fe8db0da3e2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070602_complex_content/07060202_derived_by_restriction/Pos_07060202_derived_by_restriction_002/Pos_07060202_derived_by_restriction_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0e21a181ae1c5e1677671efe410c152ea82ed782 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When group reference is a child of complexType, the compositor of the +// referenced group definition is sequence and both the minOccurs and maxOccurs +// attributes of the group reference equal to "1" (either explicitly or by +// defaulting to "1"), it shall be translated as if the child elements of the +// referenced group definition were present in the complexType definition +// directly +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070603_referencing_group_components_001 { + + import from schema_Pos_070603_referencing_group_components_001 language "XSD" all; + + template MyType m_msg := { + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_001.xml", { "Pos_070603_referencing_group_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..065f7f1f8efa012f1c0f2e37d7411ad142035377 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xml @@ -0,0 +1,5 @@ + + + New York + SuperMegaCorp Inc. + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..05254f38bdf0489dba52f39f73ea11b87fbbf924 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_001/Pos_070603_referencing_group_components_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5ea3de50e7d4301cc7a6b77ae90c82e8ebaf2c94 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring inside sequence + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_002 { + + import from schema_Pos_070603_referencing_group_components_002 language "XSD" all; + + template MyType m_msg := { + shipAndBill := { + shipTo := "Windsor Castle", + billTo := "Her Majesty" + }, + sentFrom := "Luxury department" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_002.xml", { "Pos_070603_referencing_group_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..73d00f1bcfbecbf8b31e782d8821d3fa9fa23f2b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xml @@ -0,0 +1,6 @@ + + + Windsor Castle + Her Majesty + Luxury department + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a3ae310d384be6cc655819168933626f55235bb5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_002/Pos_070603_referencing_group_components_002.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b51ce8e027cf7700f8db2357675ed2d4cf8f1e01 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, optional occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_003 { + + import from schema_Pos_070603_referencing_group_components_003 language "XSD" all; + + template MyType m_msg := { + "test", + { + shipTo := "Mars", + billTo := "NASA" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_003.xml", { "Pos_070603_referencing_group_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..cbb569b905443b119147eadff74c511c0512899f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xml @@ -0,0 +1,5 @@ + + + Mars + NASA + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a39892505419644e99b2b7116396610972de7d38 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_003/Pos_070603_referencing_group_components_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9c5aff6f6704f6043a3750d1b90124b8872c1917 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (sequence, 0..N) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_004 { + + import from schema_Pos_070603_referencing_group_components_004 language "XSD" all; + + template MyType m_msg := { + shipAndBill_list := { + { "New York", "SuperMegaCorp Inc."}, + { "Berlin", "SuperMegaGesellschaft AG" } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_004.xml", { "Pos_070603_referencing_group_components_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..77bc8b047554660a3ca16f962b48352dd3d8aaca --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xml @@ -0,0 +1,7 @@ + + + New York + SuperMegaCorp Inc. + Berlin + SuperMegaGesellschaft AG + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a122b06b20d0365c08c09f3205abba7d93785cda --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_004/Pos_070603_referencing_group_components_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e038222bb25bef9a64ccbf7301de4fa2d6dc4620 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (all, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When the referenced group has the compositor all, it has to be translated is +// the content of the referenced group definition was present directly, i.e. +// according to clause 7.6.4; + +module Pos_070603_referencing_group_components_005 { + + import from schema_Pos_070603_referencing_group_components_005 language "XSD" all; + + template MyType m_msg := { + { billTo, shipTo }, + omit, + "New York", + "SuperMegaCorp Inc." + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_005.xml", { "Pos_070603_referencing_group_components_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..02f6163555e10e9a847116e86a1638e1d2061965 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xml @@ -0,0 +1,5 @@ + + + SuperMegaCorp Inc. + New York + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5680592eb91e5f2b8593aeef0ecc7f2195a55640 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_005/Pos_070603_referencing_group_components_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..22c54839335ab9b771f1f6db7783c7e7f522addb --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (all, 0..1) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When the referenced group has the compositor all, it has to be translated is +// the content of the referenced group definition was present directly, i.e. +// according to clause 7.6.4; + +module Pos_070603_referencing_group_components_006 { + + import from schema_Pos_070603_referencing_group_components_006 language "XSD" all; + template MyType m_msg := { + { }, + omit, + omit, + omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_006.xml", { "Pos_070603_referencing_group_components_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..294bc4d01c0027690116a48acac8012e1d47961e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cf936fabd071764c9646ec31b2a5307a0e4f876d --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_006/Pos_070603_referencing_group_components_006.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c39cf78b812c808bddac58a87cfaea4101a68867 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, one occurrence) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_007 { + + import from schema_Pos_070603_referencing_group_components_007 language "XSD" all; + + template MyType m_msg := { + shipAndBill := { shipTo := "Beijing" } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_007() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_007.xml", { "Pos_070603_referencing_group_components_007.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..462c45e84e52e7db933d53d6a999e3f9fedd02d8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xml @@ -0,0 +1,4 @@ + + + Beijing + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a8786d918f959ed0c583d77e653b969381aff99c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_007/Pos_070603_referencing_group_components_007.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e575abc92f07467b93a6df7e32d1e706f6969be7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, 0..1) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_008 { + + import from schema_Pos_070603_referencing_group_components_008 language "XSD" all; + + template MyType m_empty := { + 1, omit + }; + template MyType m_msg := { + attr := omit, + shipAndBill := { billTo := "Bill the Bull" } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_008() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_008.xml", { "Pos_070603_referencing_group_components_008.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_008(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml new file mode 100644 index 0000000000000000000000000000000000000000..6b5ca0ea5ffa18d5b1ae0a0780fa678c3c02a4ce --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xml @@ -0,0 +1,4 @@ + + + Bill the Bull + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0301c0f3986d9c67e43e76e6b0a9a5dd7f7bbf7a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_008/Pos_070603_referencing_group_components_008.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c3fb5617df1cddfb037d73166eeb1fec98ebc9e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring as child of complex type (choice, 0..N) + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_009 { + + import from schema_Pos_070603_referencing_group_components_009 language "XSD" all; + + template MyType m_msg := { + shipAndBill_list := { + { + shipTo := "Mata-Utu" + }, { + billTo := "Tamasia and Malofafa" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_009() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_009.xml", { "Pos_070603_referencing_group_components_009.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_009(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d11750f71373c0c271cea167131385eb97ed024 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xml @@ -0,0 +1,5 @@ + + + Mata-Utu + Tamasia and Malofafa + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6d4026ade062300f054bfeb19d13dd0510359b7c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_009/Pos_070603_referencing_group_components_009.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..de4276c89c3c21cd427eb7225d3456448d566793 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.3, Verify conversion of group reference occurring inside choice + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In all other cases the referenced group component shall be translated to +// a field of the enclosing record of type (generated for the parent +// complexType, sequence or choice element) referencing the TTCN-3 type +// generated for the referenced group definition, considering also the +// attributes of the referenced group component according to clause 7.1. + +module Pos_070603_referencing_group_components_010 { + + import from schema_Pos_070603_referencing_group_components_010 language "XSD" all; + + template MyType m_msg := { + choice := { + shipAndBill := { + shipTo := "Ulan Bator" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070603_referencing_group_components_010() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070603_referencing_group_components_010.xml", { "Pos_070603_referencing_group_components_010.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070603_referencing_group_components_010(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml new file mode 100644 index 0000000000000000000000000000000000000000..74a306b0db8ea53cb3c3e4764e55bd14399bb32a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xml @@ -0,0 +1,4 @@ + + + Ulan Bator + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4a0ecc1f037e68e071a5c90fbb629cfe9f585429 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070603_referencing_group_components/Pos_070603_referencing_group_components_010/Pos_070603_referencing_group_components_010.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..55c93435358fdbf455c596f558201ee237367da7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify conversion of all content containing mandatory fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, when the values of both the minOccurs and maxOccurs +// attributes of the all compositor equal "1" (either explicitly or by +// defaulting to "1"), it shall be translated to TTCN-3 by adding the fields +// resulted by mapping the XSD elements to the enframing TTCN-3 record (see +// clause 7.6). +// In addition, to these fields, an extra first field named "order" shall be +// inserted into the enframing record. The type of this extra field shall be +// record of enumerated, where the names of the enumeration values shall be +// the names of the fields resulted by mapping the elements of the all +// structure. Finally, a "useOrder" variant attribute shall be attached to +// the enframing record. + +module Pos_070604_all_content_001 { + + import from schema_Pos_070604_all_content_001 language "XSD" all; + + template MyType m_msg := { + order := { bar, ding, foo }, + foo := 5, + bar := 3.14, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_001.xml", { "Pos_070604_all_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..6860497126d25ee345f5d600b092133107aca0e9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xml @@ -0,0 +1,6 @@ + + + 3.14 + ding + 5 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7f426b9372658c20d79da53f9297f559cfb273a7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_001/Pos_070604_all_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b10dad7e0db9e505c706a22f95f70ade001fbc30 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify conversion of all content with minOccurs="0" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// By setting the minOccurs XSD attribute of the all compositor to 0, all +// elements of the all content model are becoming optional. In this case all +// record fields corresponding to the elements of the all model group shall be +// set to optional too. +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070604_all_content_002 { + + import from schema_Pos_070604_all_content_002 language "XSD" all; + + template MyType m_staticCheck := { + order := {}, + foo := omit, + bar := omit, + ding := omit + }; + template MyType m_msg := { + order := { ding, foo, bar }, + foo := 5, + bar := 3.14, + ding := "test" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_002.xml", { "Pos_070604_all_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..874b63f803036b748b3ca000d0ac0181a19c1e8e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xml @@ -0,0 +1,6 @@ + + + test + 5 + 3.14 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1389449cc4f847502ecf852f44a73154fcb0c56d --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_002/Pos_070604_all_content_002.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9f6bfa57cff4f2f738fcb401251b424711fdbbc3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.ttcn @@ -0,0 +1,92 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify transformation of elements with minOccurs attribute occuring inside all content + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD all compositor shall be translated to TTCN-3 by adding the fields +// resulted by mapping the XSD elements to the enframing TTCN-3 record (see +// clause 7.6). +//////////////////////////////////////////////////////////////////////////////// + +module Pos_070604_all_content_003 { + + import from schema_Pos_070604_all_content_003 language "XSD" all; + + template MyType m_msg := { + order := { ding, foo }, + foo := 71, + bar := omit, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_003.xml", { "Pos_070604_all_content_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..235c094a182c32819050a89a0b4efd4dfa76fc4b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xml @@ -0,0 +1,5 @@ + + + ding + 71 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e7be6016bf2754f164643846227a121fcab1b219 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_003/Pos_070604_all_content_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a82669ab3efdb0a8e67b22b7c9f04ca85ae0ff18 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.4, Verify transformation of all content containing attributes + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The order field shall precede the fields resulted by the translation of the +// attributes and attribute and attributeGroup references of the given +// complexType. + +module Pos_070604_all_content_004 { + + import from schema_Pos_070604_all_content_004 language "XSD" all; + + template MyType m_msg := { + { foo, ding, bar }, + "attrInGroup1", + omit, + 1, + "attrGlobal", + 2, + 3.14, + "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070604_all_content_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070604_all_content_004.xml", { "Pos_070604_all_content_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070604_all_content_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..36fe01b279bc7a3e99e4e0674c697b91e83e4935 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xml @@ -0,0 +1,6 @@ + + + 2 + ding + 3.14 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f131dcdf744abd207b849e7677c3ebbab9730f2c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070604_all_content/Pos_070604_all_content_004/Pos_070604_all_content_004.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ad5009de368c0093d95b616209287be2576c12f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.1, Verify that choice content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested elements shall be mapped as fields of the enframing TTCN-3 union or +// record of union field(see clause 7.6.5) according to clause 7.3. + +module Pos_07060501_choice_with_nested_elements_001 { + + import from schema_Pos_07060501_choice_with_nested_elements_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060501_choice_with_nested_elements_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060501_choice_with_nested_elements_001.xml", { "Pos_07060501_choice_with_nested_elements_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060501_choice_with_nested_elements_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..21518c964ba0254fe8e45d17991d0ffd12bd3ed4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a19c8b00174fec0b3d914bc324c16ed44f1ba143 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_choice_with_nested_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6ad5009de368c0093d95b616209287be2576c12f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.1, Verify that choice content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested elements shall be mapped as fields of the enframing TTCN-3 union or +// record of union field(see clause 7.6.5) according to clause 7.3. + +module Pos_07060501_choice_with_nested_elements_001 { + + import from schema_Pos_07060501_choice_with_nested_elements_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060501_choice_with_nested_elements_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060501_choice_with_nested_elements_001.xml", { "Pos_07060501_choice_with_nested_elements_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060501_choice_with_nested_elements_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..21518c964ba0254fe8e45d17991d0ffd12bd3ed4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a19c8b00174fec0b3d914bc324c16ed44f1ba143 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060501_elements/Pos_07060501_choice_with_nested_elements_001/Pos_07060501_choice_with_nested_elements_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e1d505942c5991c7a3b6bce7397216ed764d4160 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.2, Verify that choice content with nested group is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested group components shall be mapped along with other content as +// a field of the enframing TTCN-3 union or record of union field (see clause +// 7.6.5). The type of this field shall refer to the TTCN-3 type generated for +// the corresponding group and the name of the field shall be the name of the +// TTCN-3 type with the first character uncapitalized. + +module Pos_07060502_choice_with_nested_group_001 { + + import from schema_Pos_07060502_choice_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + choice := { + group1 := { + foo := "foo", + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060502_choice_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060502_choice_with_nested_group_001.xml", { "Pos_07060502_choice_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060502_choice_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec048a56106556167d4764d6acdad1a420c8759f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e2ca42f877eed7a3e9eb111e3f12bf28006d8022 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_choice_with_nested_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e1d505942c5991c7a3b6bce7397216ed764d4160 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.2, Verify that choice content with nested group is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// Nested group components shall be mapped along with other content as +// a field of the enframing TTCN-3 union or record of union field (see clause +// 7.6.5). The type of this field shall refer to the TTCN-3 type generated for +// the corresponding group and the name of the field shall be the name of the +// TTCN-3 type with the first character uncapitalized. + +module Pos_07060502_choice_with_nested_group_001 { + + import from schema_Pos_07060502_choice_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + choice := { + group1 := { + foo := "foo", + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060502_choice_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060502_choice_with_nested_group_001.xml", { "Pos_07060502_choice_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060502_choice_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..ec048a56106556167d4764d6acdad1a420c8759f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e2ca42f877eed7a3e9eb111e3f12bf28006d8022 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060502_group/Pos_07060502_choice_with_nested_group_001/Pos_07060502_choice_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4392fe57df50083f4db6da0ba7ab1537014739f5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.3, Verify that choice content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a choice shall be translated according to clause +// 7.6.5 + +module Pos_07060503_choice_with_nested_choice_001 { + + import from schema_Pos_07060503_choice_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { + choice_1 := { + foo := 1 + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060503_choice_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060503_choice_with_nested_choice_001.xml", { "Pos_07060503_choice_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060503_choice_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d46748db8e011ccd1c14ad47334306aa1a582c7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ebe6e5a26e07a0ad47f255f856e3665a76a10248 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4392fe57df50083f4db6da0ba7ab1537014739f5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.3, Verify that choice content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a choice shall be translated according to clause +// 7.6.5 + +module Pos_07060503_choice_with_nested_choice_001 { + + import from schema_Pos_07060503_choice_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { + choice_1 := { + foo := 1 + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060503_choice_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060503_choice_with_nested_choice_001.xml", { "Pos_07060503_choice_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060503_choice_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d46748db8e011ccd1c14ad47334306aa1a582c7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ebe6e5a26e07a0ad47f255f856e3665a76a10248 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060503_choice_with_nested_choice/Pos_07060503_choice_with_nested_choice_001/Pos_07060503_choice_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8d79e7b350ab38ac4f9778bb7ca7dd41d0fb944a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with nested sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_001 { + + import from schema_Pos_07060504_choice_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_001.xml", { "Pos_07060504_choice_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..43c6ec0a805c7edebe902af91413337b80bfe8ad --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e46bf0f151ee3edaa3a2c1d90c706109a2fc9faa --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d3e5cde3fa8097fd545c412846568b80b60a3a85 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with multiple nested sequences is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_002 { + + import from schema_Pos_07060504_choice_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := "abc", + bar := "cde", + ding := "fgh", + foo_1 := "ijk", + bar_1 := "lmn" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_002.xml", { "Pos_07060504_choice_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..59b8aefddcc225c0fd4b469bcd3725700d3714b6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml @@ -0,0 +1,8 @@ + + + abc + cde + fgh + ijk + lmn + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c9bdeea399cc0dfaf61a08f1739a7e858a741d6e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_choice_with_nested_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8d79e7b350ab38ac4f9778bb7ca7dd41d0fb944a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with nested sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_001 { + + import from schema_Pos_07060504_choice_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_001.xml", { "Pos_07060504_choice_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..43c6ec0a805c7edebe902af91413337b80bfe8ad --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e46bf0f151ee3edaa3a2c1d90c706109a2fc9faa --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_001/Pos_07060504_choice_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d3e5cde3fa8097fd545c412846568b80b60a3a85 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify that choice content with multiple nested sequences is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. + +module Pos_07060504_choice_with_nested_sequence_002 { + + import from schema_Pos_07060504_choice_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence := { + foo := "abc", + bar := "cde", + ding := "fgh", + foo_1 := "ijk", + bar_1 := "lmn" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_002.xml", { "Pos_07060504_choice_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..59b8aefddcc225c0fd4b469bcd3725700d3714b6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xml @@ -0,0 +1,8 @@ + + + abc + cde + fgh + ijk + lmn + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c9bdeea399cc0dfaf61a08f1739a7e858a741d6e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_002/Pos_07060504_choice_with_nested_sequence_002.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..00e8d0b86c2ecfd64bda364d9b550243fd4d42bb --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.5.4, Verify name transformation of the "sequence" choice field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD sequence nested to a choice shall be mapped to a TTCN-3 record field +// of the enframing TTCN-3 union or record of union field (see clause 7.6.5), +// according to clause 7.6.6. The name of the record field shall be the +// result of applying clause 5.2.2 to "sequence". + +module Pos_07060504_choice_with_nested_sequence_003 { + + import from schema_Pos_07060504_choice_with_nested_sequence_003 language "XSD" all; + + template MyType m_msg := { + choice := { + sequence_1 := { + foo := 1, + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060504_choice_with_nested_sequence_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060504_choice_with_nested_sequence_003.xml", { "Pos_07060504_choice_with_nested_sequence_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060504_choice_with_nested_sequence_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..e654d4d9458c18a1eca7b4ea24fc61680c78ff56 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2f7f404e3e59db6af1c4cf98bcb84308b7011d4c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060504_sequence/Pos_07060504_choice_with_nested_sequence_003/Pos_07060504_choice_with_nested_sequence_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1f571d9f99f47d7682f91141774ab160ea20f367 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.5, Verify that choice content with nested any is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested to a choice shall be translated according to +// clause 7.7. + +module Pos_07060505_choice_with_nested_any_001 { + + import from schema_Pos_07060505_choice_with_nested_any_001 language "XSD" all; + + template MyType m_msg := { + choice := { + elem := "abc" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060505_choice_with_nested_any_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060505_choice_with_nested_any_001.xml", { "Pos_07060505_choice_with_nested_any_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060505_choice_with_nested_any_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..2dbfc2bbee4cd6e9dc63670341378ae05fd69891 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5df688f028096abdc1bf64c25192f0a18cf606ec --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1f571d9f99f47d7682f91141774ab160ea20f367 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5.5, Verify that choice content with nested any is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested to a choice shall be translated according to +// clause 7.7. + +module Pos_07060505_choice_with_nested_any_001 { + + import from schema_Pos_07060505_choice_with_nested_any_001 language "XSD" all; + + template MyType m_msg := { + choice := { + elem := "abc" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060505_choice_with_nested_any_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060505_choice_with_nested_any_001.xml", { "Pos_07060505_choice_with_nested_any_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060505_choice_with_nested_any_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..2dbfc2bbee4cd6e9dc63670341378ae05fd69891 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xml @@ -0,0 +1,2 @@ + +abc \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..5df688f028096abdc1bf64c25192f0a18cf606ec --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/07060505_choice_with_nested_any/Pos_07060505_choice_with_nested_any_001/Pos_07060505_choice_with_nested_any_001.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a6613d80b0940a2ad7243035e7ce56762d52480f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5, Verify that choice content with minOccurs different than 1 is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the minOccurs or the maxOccurs attributes or both differ +// from "1", the following rules shall apply: +// a) The union field shall be generated as above (including attaching the +// "untagged" encoding instruction). +// b) The procedures in clause 7.1.4 shall be called for the union field. +// NOTE: As the result of applying clause 7.1.4, the type of the field may be +// changed to record of union and in parallel the name of the field may be +// changed to "choice_list". +// c) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and subsequently the field shall be added to the enframing TTCN-3 record +// type (see clause 7.6) or record or union field corresponding to the parent +// of the mapped choice compositor. + +module Pos_070605_top_level_001 { + + import from schema_Pos_070605_top_level_001 language "XSD" all; + + template MyType m_msg := { + choice := { + foo := 1 + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070605_top_level_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070605_top_level_001.xml", { "Pos_070605_top_level_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070605_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..b83916bd8561a638f75b47a9949fab8822c26253 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xml @@ -0,0 +1,4 @@ + + + 1 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..58db3bc9c56ae43941edcec7d5c30ebe12ecf51c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_001/Pos_070605_top_level_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eb5da1513c05713107ffe1e6d1c462a22d44901a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.ttcn @@ -0,0 +1,103 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.5, Verify that choice content with maxOccurs larger than 1 is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// If the value of the minOccurs or the maxOccurs attributes or both differ +// from "1", the following rules shall apply: +// a) The union field shall be generated as above (including attaching the +// "untagged" encoding instruction). +// b) The procedures in clause 7.1.4 shall be called for the union field. +// NOTE: As the result of applying clause 7.1.4, the type of the field may be +// changed to record of union and in parallel the name of the field may be +// changed to "choice_list". +// c) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and subsequently the field shall be added to the enframing TTCN-3 record +// type (see clause 7.6) or record or union field corresponding to the parent +// of the mapped choice compositor. + +module Pos_070605_top_level_002 { + + import from schema_Pos_070605_top_level_002 language "XSD" all; + + template MyType m_msg := { + choice_list := { + { + foo := 1 + }, { + bar := "bar" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070605_top_level_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070605_top_level_002.xml", { "Pos_070605_top_level_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070605_top_level_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..b576a6eec97cbfead493b7c0ea530712d007ecc2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ce22ef3c8de167548ccac36f34c6272ec7784b37 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070605_choice_content/070605_top_level/Pos_070605_top_level_002/Pos_070605_top_level_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0686e093b5afd18b1292ae13066456764a5cdcdf --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.1, Verify that sequence content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, child elements of a sequence, which is a child of +// a complexType, shall be mapped to TTCN-3 as fields of the enframing record +// (see clause 7.6) (i.e. the sequence itself is not producing any TTCN-3 +// construct). + +module Pos_07060601_sequence_with_nested_element_001 { + + import from schema_Pos_07060601_sequence_with_nested_element_001 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := "bar" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060601_sequence_with_nested_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060601_sequence_with_nested_element_001.xml", { "Pos_07060601_sequence_with_nested_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060601_sequence_with_nested_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..3c48f91e46dc9cff35e7e42780fa0ad4a4ee0261 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ae44bdad64ee84fd4f620db8c94ea5456be881ec --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0686e093b5afd18b1292ae13066456764a5cdcdf --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.1, Verify that sequence content with nested elements is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, child elements of a sequence, which is a child of +// a complexType, shall be mapped to TTCN-3 as fields of the enframing record +// (see clause 7.6) (i.e. the sequence itself is not producing any TTCN-3 +// construct). + +module Pos_07060601_sequence_with_nested_element_001 { + + import from schema_Pos_07060601_sequence_with_nested_element_001 language "XSD" all; + + template MyType m_msg := { + foo := 1, + bar := "bar" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060601_sequence_with_nested_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060601_sequence_with_nested_element_001.xml", { "Pos_07060601_sequence_with_nested_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060601_sequence_with_nested_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..3c48f91e46dc9cff35e7e42780fa0ad4a4ee0261 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xml @@ -0,0 +1,5 @@ + + + 1 + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ae44bdad64ee84fd4f620db8c94ea5456be881ec --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060601_sequence_with_nested_element/Pos_07060601_sequence_with_nested_element_001/Pos_07060601_sequence_with_nested_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0078d550b4e42d928d50baed581334d598ae60ad --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.2, Verify that sequence content with group reference is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, nested group reference components shall be mapped +// to a field of the enframing record type (see clause 7.6) or field. The +// type of the field shall be the TTCN-3 type generated for the referenced +// group and the name of the field shall be the result of applying clause +// 5.2.2 to the name of the referenced group. + +module Pos_07060602_sequence_with_nested_group_001 { + + import from schema_Pos_07060602_sequence_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + group1 := { + foo := "foo" + }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060602_sequence_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060602_sequence_with_nested_group_001.xml", { "Pos_07060602_sequence_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060602_sequence_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c22219ceddac9d7b37e5ea7316238cbf27fc625b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6380d0a95514d1e533180f1cb9a5d1c302b2ad7b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0078d550b4e42d928d50baed581334d598ae60ad --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.2, Verify that sequence content with group reference is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, nested group reference components shall be mapped +// to a field of the enframing record type (see clause 7.6) or field. The +// type of the field shall be the TTCN-3 type generated for the referenced +// group and the name of the field shall be the result of applying clause +// 5.2.2 to the name of the referenced group. + +module Pos_07060602_sequence_with_nested_group_001 { + + import from schema_Pos_07060602_sequence_with_nested_group_001 language "XSD" all; + + template MyType m_msg := { + group1 := { + foo := "foo" + }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060602_sequence_with_nested_group_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060602_sequence_with_nested_group_001.xml", { "Pos_07060602_sequence_with_nested_group_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060602_sequence_with_nested_group_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..c22219ceddac9d7b37e5ea7316238cbf27fc625b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6380d0a95514d1e533180f1cb9a5d1c302b2ad7b --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060602_sequence_with_nested_group/Pos_07060602_sequence_with_nested_group_001/Pos_07060602_sequence_with_nested_group_001.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3f73ba2f838faf97665fa245650918106d2346a7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.3, Verify that sequence content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a sequence shall be mapped as a field of the +// enframing record (see clauses 7.6, 7.6.5.4 and 7.6.6.4), according to clause +// 7.6.5 (i.e. the sequence itself is not producing any TTCN-3 construct). + +module Pos_07060603_sequence_with_nested_choice_001 { + + import from schema_Pos_07060603_sequence_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { foo := "foo" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060603_sequence_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060603_sequence_with_nested_choice_001.xml", { "Pos_07060603_sequence_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060603_sequence_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d72c5bd21234922bf67a6257ea65db5a6127e24 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cafa00983a4cffab89144e078c7c85d99c4b4aac --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3f73ba2f838faf97665fa245650918106d2346a7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.3, Verify that sequence content with nested choice is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD choice nested to a sequence shall be mapped as a field of the +// enframing record (see clauses 7.6, 7.6.5.4 and 7.6.6.4), according to clause +// 7.6.5 (i.e. the sequence itself is not producing any TTCN-3 construct). + +module Pos_07060603_sequence_with_nested_choice_001 { + + import from schema_Pos_07060603_sequence_with_nested_choice_001 language "XSD" all; + + template MyType m_msg := { + choice := { foo := "foo" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060603_sequence_with_nested_choice_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060603_sequence_with_nested_choice_001.xml", { "Pos_07060603_sequence_with_nested_choice_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060603_sequence_with_nested_choice_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d72c5bd21234922bf67a6257ea65db5a6127e24 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xml @@ -0,0 +1,5 @@ + + + foo + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cafa00983a4cffab89144e078c7c85d99c4b4aac --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060603_sequence_with_nested_choice/Pos_07060603_sequence_with_nested_choice_001/Pos_07060603_sequence_with_nested_choice_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b911e40f3e44d4e9567042ac78ebd56b06c18aa9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_001 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_001.xml", { "Pos_07060604_sequence_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..59856a9e5ae37df16ec091ddec07d4bf9a524fa6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml @@ -0,0 +1,6 @@ + + + foo + bar + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9378a8513931e62dbf12f7b3e0eb0c8714f5d72c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..037352b28236e7a802919027cdeb54bdc25ca6c7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with various nested particles is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_002 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + choice := { bar := "bar" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_002.xml", { "Pos_07060604_sequence_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a3f178fa81dfdb37e5e655196cbf557c2cbdfcd --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml @@ -0,0 +1,7 @@ + + + foo + bar + bar + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c33d6cd2bacffc8aa16930852eeb1220e8a2e2a6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b911e40f3e44d4e9567042ac78ebd56b06c18aa9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with sequence is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_001 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_001.xml", { "Pos_07060604_sequence_with_nested_sequence_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..59856a9e5ae37df16ec091ddec07d4bf9a524fa6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xml @@ -0,0 +1,6 @@ + + + foo + bar + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9378a8513931e62dbf12f7b3e0eb0c8714f5d72c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_001/Pos_07060604_sequence_with_nested_sequence_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..037352b28236e7a802919027cdeb54bdc25ca6c7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.4, Verify that sequence content with various nested particles is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the general case, a sequence nested in a sequence shall be translated to +// TTCN-3 according to clause 7.6.6 and the resulted constructs shall be added +// to the enframing record type or field (see also clauses 7.6 and 7.6.5.4). + +module Pos_07060604_sequence_with_nested_sequence_002 { + + import from schema_Pos_07060604_sequence_with_nested_sequence_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + bar := "bar", + choice := { bar := "bar" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060604_sequence_with_nested_sequence_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060604_sequence_with_nested_sequence_002.xml", { "Pos_07060604_sequence_with_nested_sequence_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060604_sequence_with_nested_sequence_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a3f178fa81dfdb37e5e655196cbf557c2cbdfcd --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xml @@ -0,0 +1,7 @@ + + + foo + bar + bar + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c33d6cd2bacffc8aa16930852eeb1220e8a2e2a6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060604_sequence_with_nested_sequence/Pos_07060604_sequence_with_nested_sequence_002/Pos_07060604_sequence_with_nested_sequence_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74bb14e844ee0c2866bb1e0c73f2aec680d569e2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.5, Verify that sequence content with nested any content is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested in a sequence shall be translated according to +// clause 7.7. + +module Pos_07060605_sequence_with_nested_any_content_001 { + + import from schema_Pos_07060605_sequence_with_nested_any_content_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + elem := "abc" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060605_sequence_with_nested_any_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060605_sequence_with_nested_any_content_001.xml", { "Pos_07060605_sequence_with_nested_any_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060605_sequence_with_nested_any_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a591b388b0160391bff5b560ca7abaa347f939f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml @@ -0,0 +1,3 @@ + + + fooabc \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7d4d1a41749b2a22d09c98332c1be32c015a1c2c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_any/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74bb14e844ee0c2866bb1e0c73f2aec680d569e2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.5, Verify that sequence content with nested any content is correctly transformed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// An XSD any element nested in a sequence shall be translated according to +// clause 7.7. + +module Pos_07060605_sequence_with_nested_any_content_001 { + + import from schema_Pos_07060605_sequence_with_nested_any_content_001 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + elem := "abc" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060605_sequence_with_nested_any_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060605_sequence_with_nested_any_content_001.xml", { "Pos_07060605_sequence_with_nested_any_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060605_sequence_with_nested_any_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..8a591b388b0160391bff5b560ca7abaa347f939f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xml @@ -0,0 +1,3 @@ + + + fooabc \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7d4d1a41749b2a22d09c98332c1be32c015a1c2c --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060605_sequence_with_nested_any_content/Pos_07060605_sequence_with_nested_any_content_001/Pos_07060605_sequence_with_nested_any_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..becb514c13d11a25bc37d42315a33c9835f8c837 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,100 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=0 are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 language "XSD" all; + + template MyType m_msg := { + sequence := { + foo := "foo", + bar := "bar" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..6cc9ed6b5b2f99e1a08405f350081ccf3a22d026 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f7f63456a2f1e6ef5c033cf5d9e461f73bf57791 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fbae4c8c405df01910bc7495cdcc1cca597d1c28 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 language "XSD" all; + + template MyType m_msg := { + sequence := omit, + choice := { foo1 := "foo1" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..4040c99faa2310ef80cb0e82c6b376c3f57500a0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + foo1 + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1055e2f33995376e6d3900c434acb985a7798c91 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c6b017525f441f2a500030f4451c78acdf2ab8f9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,105 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=unbounded are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..619ac8da29ab3c2b858733d1a18fb1eeea46431f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,7 @@ + + + foo1 + bar1 + foo2 + bar2 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7cc3d8710559b3d647ba1670c419e485eac93e59 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..14c7f411c638a3dc5d71e4d82cf6068ad542e3ee --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,106 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..f61f975707471e3995a99b5d96e23446dc72f311 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,8 @@ + + + foo1 + bar1 + foo2 + bar2 + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6b8b43f80cd55a31528276212aaba525720c96da --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_effect_of_minoccurs_and_maxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..becb514c13d11a25bc37d42315a33c9835f8c837 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.ttcn @@ -0,0 +1,100 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=0 are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001 language "XSD" all; + + template MyType m_msg := { + sequence := { + foo := "foo", + bar := "bar" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..6cc9ed6b5b2f99e1a08405f350081ccf3a22d026 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xml @@ -0,0 +1,5 @@ + + + foo + bar + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f7f63456a2f1e6ef5c033cf5d9e461f73bf57791 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001/Pos_07060606_effect_of_minoccurs_and_maxoccurs_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fbae4c8c405df01910bc7495cdcc1cca597d1c28 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.ttcn @@ -0,0 +1,99 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to optional fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002 language "XSD" all; + + template MyType m_msg := { + sequence := omit, + choice := { foo1 := "foo1" }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..4040c99faa2310ef80cb0e82c6b376c3f57500a0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xml @@ -0,0 +1,5 @@ + + + foo1 + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1055e2f33995376e6d3900c434acb985a7798c91 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002/Pos_07060606_effect_of_minoccurs_and_maxoccurs_002.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c6b017525f441f2a500030f4451c78acdf2ab8f9 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.ttcn @@ -0,0 +1,105 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that sequences with minOccurs=unbounded are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..619ac8da29ab3c2b858733d1a18fb1eeea46431f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xml @@ -0,0 +1,7 @@ + + + foo1 + bar1 + foo2 + bar2 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..7cc3d8710559b3d647ba1670c419e485eac93e59 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003/Pos_07060606_effect_of_minoccurs_and_maxoccurs_003.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..14c7f411c638a3dc5d71e4d82cf6068ad542e3ee --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.ttcn @@ -0,0 +1,106 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that nested sequences are correctly converted to record of fields + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004 language "XSD" all; + + template MyType m_msg := { + sequence_list := { + { + foo := "foo1", + bar := "bar1" + }, { + foo := "foo2", + bar := "bar2" + } + }, + ding := "ding" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..f61f975707471e3995a99b5d96e23446dc72f311 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xml @@ -0,0 +1,8 @@ + + + foo1 + bar1 + foo2 + bar2 + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6b8b43f80cd55a31528276212aaba525720c96da --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004/Pos_07060606_effect_of_minoccurs_and_maxoccurs_004.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..483878004522e82cbac4e7f0ff3db02c0a79dea5 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.ttcn @@ -0,0 +1,107 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.6.6, Verify that a wrapping optional record is decoded as omit if none of fields contained in it is present + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When either or both the minOccurs and/or the maxOccurs attributes of the +// sequence compositor specify a different value than "1", the following rules +// shall apply: +// a) First, the sequence compositor shall be mapped to a TTCN-3 record field +// (as opposed to ignoring it in the previous clauses, when both minOccurs and +// maxOccurs equal to 1) with the name "sequence". +// b) The encoding instruction "untagged" shall be attached to the field +// corresponding to sequence. +// c) The procedures in clause 7.1.4 shall be applied to this record field. +// d) Finally, clause 5.2.2 shall be applied to the name of the resulted field +// and the field shall be added to the enframing TTCN-3 record (see clauses 7.6 +// and 7.6.6) or union field (see clause 7.6.5). + +module Pos_07060606_effect_of_minoccurs_and_maxoccurs_005 { + + import from schema_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005 language "XSD" all; + + template Optionals_in_optional m_msg := { + sequence := { + elem1 := omit, + elem2 := omit, + elem3 := omit, + elem4 := omit, + elem5 := omit + } + }; + + template Optionals_in_optional m_rcv := { + sequence := omit + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml", { "Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_rcv) { // The value has been changed by the encoder or decoder (in a predictable way) + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_07060606_effect_of_minoccurs_and_maxoccurs_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..08fa0033acce89b227e94b87bf0a3d27f93994e3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xml @@ -0,0 +1,2 @@ + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6168075da223604491c25941a10bf1ca97be01fd --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070606_sequence_content/07060606_minmaxoccurs/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005/Pos_07060606_effect_of_minoccurs_and_maxoccurs_005.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7244dea0db039d1cdecd371e1340e2a81eded47f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.ttcn @@ -0,0 +1,80 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify referencing an attributeGroup in a complexType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001 { + + import from schema_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001 language "XSD" all; + + template E1 m_msg := {bar:=5.0, foo:=omit, ding:="text"}; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..154aa5339660890164aee9164c961aff2f010276 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xml @@ -0,0 +1,6 @@ + + +text + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c906793958e2470d3577b3baff7f94b5191f79b3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__001/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f373f27b518a3859e13b52a2f332b72dca0935b6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify mapping of a local attributes, attribute references and attribute group references without a target namespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002 { + + import from NoTargetNamespace language "XSD" all + with { + extension "File:../Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd"; + }; + + template E1 m_msg := { + barInAgroup := "text", + barLocal := omit, + dingInAgroup := 1, + dingLocal := omit, + fooInAgroup := omit, + fooLocal := omit, + barGlobal := omit, + dingGlobal := omit, + fooGlobal := omit, + elem := "text" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..5db9f7de8cdc83c92e3a235d82e94f39b3bd6ce0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xml @@ -0,0 +1,6 @@ + + + text + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..cb8fbf81ff3fc72b6d42fa1b43b47e0b0a555d36 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__002/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_002.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c04ea8e1f646822ddf53a1888ca1d064abb7734 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.7, Verify mapping of a local attributes, attribute references and attribute group references with a target namespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003 { + + import from schema_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003 language "XSD" all; + + template E1 m_msg := { + barInAgroup := "text", + barLocal := "text1", + dingInAgroup := 1, + dingLocal := 2, + fooInAgroup := 1.0, + fooLocal := 2.0, + barGlobal := "text2", + dingGlobal := 1, + fooGlobal := 3.0, + elem := "text1234" + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml", { "Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ce39d5edc19f6731e9461a8117b872a265d775d --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xml @@ -0,0 +1,6 @@ + + +text1234 + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fc692c22875ede1e16bb57d92cbb94318101cd2d --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070607_attribute/Pos_070607_attribute__003/Pos_070607_attribute_definitions_attribute_and_attributegroup_references_003.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8a6169c6c3770eb1b5cd460c8d8468fe272479d6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify that an error is generated if there are too many items in the embed_values field + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// In TTCN-3 values the number of components of the embed_values field (the number +// of strings to be inserted) shall not exceed the total number of components +// present in the enclosing enframing record, corresponding to the child element +// elements of the complexType with the mixed="true" attribute, i.e. ignoring fields +// corresponding to attribute elements, the embed_values field itself and the order +// field, if present (see clause 7.6.4), plus 1 (i.e. all components of enclosed +// record of-s). + +module Neg_070608_mixed_content_001 { + + import from schema_Neg_070608_mixed_content_001 language "XSD" all; + + template MyType m_msg := { + embed_values:= { "Arrival status. ", "Wait for further information." }, + order := {}, + a:= omit, + b:= omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Neg_070608_mixed_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Neg_070608_mixed_content_001.xml", { "Neg_070608_mixed_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_070608_mixed_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..608e2c52826e8dc390c2d28c5d469eb060a69281 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xml @@ -0,0 +1,2 @@ + +Arrival status. Wait for further information. \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..daa210519c5cb3219d411c73fced112e7dc63c52 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Neg_070608_mixed_content_005/Neg_070608_mixed_content_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..89ca5bacbe946e8687d94cba58a15b56e909829f --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type with sequence constructor and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the sequence +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_001 { + + import from schema_Pos_070608_mixed_content_001 language "XSD" all; + + template MyType m_msg := { + embed_values:= {"The ordered ", " has arrived ", "Wait for further information."}, + attrib := omit, + a:= "car", + b:= true + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_001.xml", { "Pos_070608_mixed_content_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..65320c0b8748fc4c9a2d5b6ef489e5b44d51df64 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xml @@ -0,0 +1,2 @@ + +The ordered car has arrived trueWait for further information. \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..52d00d3043237e411ef33ec818ecfb69bada0dcb --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_001/Pos_070608_mixed_content_001.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6f92a44c93ffd48cf40128fbb48cc6db6b554efd --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of omplex type definition with sequence constructor of multiple occurrences and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the sequence +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_002 { + + import from schema_Pos_070608_mixed_content_002 language "XSD" all; + + template MyType m_msg := { + embed_values := { "The ordered", "has arrived", + "the ordered", "has arrived!", "Wait for further information."}, + sequence_list := { + { a:= "car", b:= false}, + { a:= "bicycle", b:= true} + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_002.xml", { "Pos_070608_mixed_content_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..03674dd94d181192f42b71915610e7b4439c7b8d --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xml @@ -0,0 +1,2 @@ + +The orderedcarhas arrivedfalsethe orderedbicyclehas arrived!trueWait for further information. \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d6ef1b104c7c76bf6723cf0566ed60772702fcf6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_002/Pos_070608_mixed_content_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..150f2ac03e08ac54760f0bd17979698540f39bbd --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the all +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType and the order field, if any, generated for the all +// content models. + +module Pos_070608_mixed_content_003 { + + import from schema_Pos_070608_mixed_content_003 language "XSD" all; + + template MyType m_msg := { + {"Arrival status", "product name","Wait for further information."}, + {b,a}, + omit, + "car", + false + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_003.xml", { "Pos_070608_mixed_content_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..3bbe21c62b6113f5be29dd90530a513ce23a8cc7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xml @@ -0,0 +1,2 @@ + +Arrival statusfalseproduct namecarWait for further information. \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b6f090606726f18d26cc7ba1871b31b8e4664e1e --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_003/Pos_070608_mixed_content_003.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d74d19c0c54e0535539572a4eeb386e8a517803a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @version 0.0.2 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor, optional elements and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the all +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType and the order field, if any, generated for the all +// content models. + +module Pos_070608_mixed_content_004 { + + import from schema_Pos_070608_mixed_content_004 language "XSD" all; + + template MyType m_msg := { + embed_values:= { "Arrival status" }, + order := {}, + a:= omit, + b:= omit + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_004.xml", { "Pos_070608_mixed_content_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..1e411eec587b51105d8fb60c60356ad67d463fd6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xml @@ -0,0 +1,2 @@ + +Arrival status \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9a3649aa2a084800c7a1fd1850302f0ef4dcc067 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_004/Pos_070608_mixed_content_004.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..90ebcfb21e93a3b3974aa8b06eb98711e35f781a --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.ttcn @@ -0,0 +1,95 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.6.8, Verify transformation of complex type definition with all constructor, optional elements and mixed content type + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The following requirements are tested: +// When mixed content is allowed for a complex type or content, (i.e. the mixed +// attribute is set to "true") an additional record of XSD.String field, with +// the field name "embed_values" shall be generated and inserted as the first +// field of the outer enframing TTCN-3 record type generated for the choice +// content. +// The embed_values field shall precede all other fields, resulted by the +// translation of the attributes and attribute and attributeGroup references of +// the given complexType. + +module Pos_070608_mixed_content_005 { + + import from schema_Pos_070608_mixed_content_005 language "XSD" all; + + template MyComplexElem_14 m_msg := { + embed_values:= {"Arrival status", "Wait for further information."}, + choice := { b:= false } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070608_mixed_content_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070608_mixed_content_005.xml", { "Pos_070608_mixed_content_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070608_mixed_content_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..29466375d204201f785a7ec15b7d2743664d27ae --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xml @@ -0,0 +1,2 @@ + +Arrival statusfalseWait for further information. \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9c339ce1fa0482d19c00bea9e79ffe6c16ebf4c0 --- /dev/null +++ b/xml/07_mapping_xsd_components/0706_complextype_components/070608_mixed_content/Pos_070608_mixed_content_005/Pos_070608_mixed_content_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..49d0f8e7a23b8694660babe571a657aa18817314 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element without namespace attribute + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_001 { + + import from schema_Pos_070701_the_any_element_001 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_001.xml", { "Pos_070701_the_any_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..cad9e67f9cf864fbbda36e6dd4041484234a6316 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a2d6d31034234348d0b82240e94295331389d639 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_001/Pos_070701_the_any_element_001.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..59f553f226e2daf25333681c3ddd01f5043f158b --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##any namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_002 { + + import from schema_Pos_070701_the_any_element_002 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_002.xml", { "Pos_070701_the_any_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..3aff46cf64453b3351bf6953073b76511d14ad9a --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4c46de3002a33348c533a3528b28da83c33936fe --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_002/Pos_070701_the_any_element_002.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..baa24e9528b5ae791668471df31ccb947d8eca00 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##local namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_003 { + + import from schema_Pos_070701_the_any_element_003 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_003.xml", { "Pos_070701_the_any_element_003.xsd", "Pos_070701_the_any_element_003_01_xsd.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..ad9280597eea64025704378de6252b571166fba2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a3bc1da15bf4a4a6e1ef6500459cf2af9cf67e7a --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c38931739c8d372e63fcac18014910589c33edd4 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_003/Pos_070701_the_any_element_003_01_xsd.xsd @@ -0,0 +1,4 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7ea5ce2544ea7981b4cd714557ec5380e12e47c2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##other namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_004 { + + import from schema_Pos_070701_the_any_element_004 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_004.xml", { "Pos_070701_the_any_element_004.xsd", "Pos_070701_the_any_element_004_1.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..5cec3747bbf6d7de7ca26f5710a6d59bf5e44406 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ac7ee329da4db2d64d073f95f1df6f7cd6ade647 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd new file mode 100644 index 0000000000000000000000000000000000000000..e2242cb12646a67f316aaba7a40905bce2503434 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_004/Pos_070701_the_any_element_004_1.xsd @@ -0,0 +1,6 @@ + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7e8fd24a0f95697b227efbcda9b96d5a0d56635b --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with ##targetNamespace namespace + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_005 { + + import from schema_Pos_070701_the_any_element_005 language "XSD" all; + + template MyType m_msg := { + elem := "Hello world" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_005.xml", { "Pos_070701_the_any_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..f85f78edd2f2101626044e6efc58d45d3485c257 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xml @@ -0,0 +1,2 @@ + +Hello world \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d6b44eff6539fc0b97ab17f6889c4fb1fb28478d --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_005/Pos_070701_the_any_element_005.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..817ae542a0e8ea18fabc7ea715c392578efd1e4c --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element with URL as namespace into record of + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD any element shall be translated, like other elements, to a field of +// the enframing record type or field or union field (see clauses 7.6, 7.6.5 and +// 7.6.6). The type of this field shall be XSD.String and the name of the field +// shall be the result of applying clause 5.2.2 to "elem". Finally the +// "anyElement..." encoding instruction shall be attached, which shall also +// specify the namespace wildcards and/or list of namespaces which are allowed +// or restricted to qualify the given element, in accordance with the namespace +// attribute of the XSD any element, if present (see details in clause B.3.2). + +module Pos_070701_the_any_element_006 { + + import from schema_Pos_070701_the_any_element_006 language "XSD" all; + + template MyType m_msg := { + elem_list := { + "banana", + "orange", + "parsley" + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070701_the_any_element_006() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070701_the_any_element_006.xml", { "Pos_070701_the_any_element_006.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..961847a754abcb2ef9158e05157e77c8de5c1bd2 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xml @@ -0,0 +1,6 @@ + + +banana +orange +parsley + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c43be3c213d8e4f340a15376cc3c4554d5c1e4a3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_006/Pos_070701_the_any_element_006.xsd @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a053887c6674e9a6c6310222e926a0f6e8b0a2dc --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.7.1, Verify conversion of the any element to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_070701_the_any_element_007 { + + import from schema_Pos_070701_the_any_element_007 language "XSD" all; + + template MyType m_msg := { elem := { Test := "abc" } }; + + + + /** + * @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_Pos_070701_the_any_element_007() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070701_the_any_element_007(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml new file mode 100644 index 0000000000000000000000000000000000000000..97af58f8777e6569e9742a249773475f3de299fa --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xml @@ -0,0 +1,4 @@ + + + abc + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9a2416f27dc0fea70ea1b2c1131d76b332b48c0a --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070701_the_any_element/Pos_070701_the_any_element_007/Pos_070701_the_any_element_007.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b8c170210aecaf2fed0732c94327bb0f9917b114 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.ttcn @@ -0,0 +1,93 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify conversion of anyAttribute element + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The anyAttribute element shall be translated, like other attributes, to +// a field of the enframing record type or field or union field (see clauses +// 7.6, 7.6.5 and 7.6.6). The type of this field shall be record length +// (1..infinity) of XSD.String. + +module Pos_070702_the_anyattribute_element_001 { + + import from schema_Pos_070702_the_anyattribute_element_001 language "XSD" all; + + template MyType m_msg := { + attr := { + "schema:Pos_070702_the_anyattribute_element_001 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_001 foo=""foo""" + }, + base := "Hello world!" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_001.xml", { "Pos_070702_the_anyattribute_element_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7fe5074316ef74a02306df2580a65a836de9889 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..677e051ef8daebd47076e3b98e1c229582b1936b --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_001/Pos_070702_the_anyattribute_element_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dddf5b544cb3af3304eb86be250b64e5036e963d --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.ttcn @@ -0,0 +1,89 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that anyAttribute is converted into optional field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The anyAttribute element shall be translated, like other attributes, to +// a field of the enframing record type or field or union field (see clauses +// 7.6, 7.6.5 and 7.6.6). ... The field shall always be optional. + +module Pos_070702_the_anyattribute_element_002 { + + import from schema_Pos_070702_the_anyattribute_element_002 language "XSD" all; + + template MyType m_msg := { + foo := "foo", + attr := omit, + base := "Hello world!" + }; + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_002.xml", { "Pos_070702_the_anyattribute_element_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..06faf33bc9a1e31cd1af47ee0fc2180a5c1cfc4e --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..027fd300cd6a3de06ebe7ac69a06971bdacb340a --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_002/Pos_070702_the_anyattribute_element_002.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5f4e6b60ec005f96b8ec03180195ebc875ab9d79 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that the naming rules apply to converted anyAttribute field + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The name of the field shall be the result of applying clause 5.2.2 to "attr". + +module Pos_070702_the_anyattribute_element_003 { + + import from schema_Pos_070702_the_anyattribute_element_003 language "XSD" all; + + template MyType m_msg := { + attr := "test", + attr_1 := { + "schema:Pos_070702_the_anyattribute_element_003 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_003 foo=""foo""" + }, + base := "Hello world!" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_003.xml", { "Pos_070702_the_anyattribute_element_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..372975b15dcab2b2b8746163a6f7945f9d1dfb62 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..1e865af2f7a89eb0c40767dcb610db5fd27c20cb --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_003/Pos_070702_the_anyattribute_element_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53e368085b6860c7b9565135755ff2a40c1693fd --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.ttcn @@ -0,0 +1,96 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that conversion of anyAttribute present both in extended type and extension base + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// In the case an XSD component contains more than one anyAttribute elements +// (e.g. by a complex type extending an another complex type already containing +// an anyAttribute), only one new field shall be generated for all the +// anyAttribute elements (with the name resulted from applying clause 5.2.2 to +// "attr") but the namespace specifications of all anyAttribute components shall +// be considered in the "anyAttributes" encoding instruction (see below). + +module Pos_070702_the_anyattribute_element_004 { + + import from schema_Pos_070702_the_anyattribute_element_004 language "XSD" all; + + template MyType m_msg := { + ding := "ding", + attr := { + "schema:Pos_070702_the_anyattribute_element_004 bar=""bar""", + "schema:Pos_070702_the_anyattribute_element_004 foo=""foo""" + }, + field := "Hello world!" + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_004() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_004.xml", { "Pos_070702_the_anyattribute_element_004.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_004(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml new file mode 100644 index 0000000000000000000000000000000000000000..aed204bf73e9bfeba7a99b9a5550692f7480d15b --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xml @@ -0,0 +1,4 @@ + + + Hello world! + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b778155276619b01eeab0a73fa86cbf2be4827df --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_004/Pos_070702_the_anyattribute_element_004.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1923f2ea4313624c6131a24d8f238b23866aa8b7 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.ttcn @@ -0,0 +1,87 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify that converted anyAttribute field is in correct place + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The field shall be inserted directly after the fields generated for the XSD +// attribute elements of the same component or, if the component does not +// contain an attribute component, in the place where the first field generated +// for an XSD attribute would be inserted (see clause 7.6.7). + +module Pos_070702_the_anyattribute_element_005 { + + import from schema_Pos_070702_the_anyattribute_element_005 language "XSD" all; + + template MyType m_msg := { "bar", { "schema:Pos_070702_the_anyattribute_element_005 foo=""foo""" }, "ding" } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_070702_the_anyattribute_element_005() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_070702_the_anyattribute_element_005.xml", { "Pos_070702_the_anyattribute_element_005.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_005(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml new file mode 100644 index 0000000000000000000000000000000000000000..dc1f765ba4fe7464c811f552dd343491407c8352 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xml @@ -0,0 +1,4 @@ + + + ding + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c179c633fd555858b9c618caa8830f3d123006c1 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_005/Pos_070702_the_anyattribute_element_005.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e121a43e7838e782f09cfe3bf2ef69c5d33a19f8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.ttcn @@ -0,0 +1,63 @@ +/*************************************************** + ** @author STF 548 + ** @version 0.0.1 + ** @purpose 9:7.7.2, Verify conversion of anyAttribute element to TTCN-3 anytype + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration any_to_anytype +***************************************************/ + +module Pos_070702_the_anyattribute_element_006 { + + import from schema_Pos_070702_the_anyattribute_element_006 language "XSD" all; + + template MyType m_msg := { attr := { {Bar := "bar"}, { Foo := "foo" } }, base := "Hello world!" }; + + + + /** + * @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_Pos_070702_the_anyattribute_element_006() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_070702_the_anyattribute_element_006(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml new file mode 100644 index 0000000000000000000000000000000000000000..9d88fc01e94bf0d25025c03c4e6eb6c3196638df --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xml @@ -0,0 +1,2 @@ + +Hello world! \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4a0db05a546db7e8b51751db1841885108fe9f04 --- /dev/null +++ b/xml/07_mapping_xsd_components/0707_any_and_anyattribute/070702_the_anyattribute_element/Pos_070702_the_anyattribute_element_006/Pos_070702_the_anyattribute_element_006.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cf6414f61b220ead930100f0ab636f8c08c5db50 --- /dev/null +++ b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.ttcn @@ -0,0 +1,85 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.8, Verify that XSD annotation can be processed + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// +//////////////////////////////////////////////////////////////////////////////// + +module Pos_0708_annotation_001 { + + import from schema_Pos_0708_annotation_001 language "XSD" all; + + template MyType m_msg := "test"; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0708_annotation_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0708_annotation_001.xml", { "Pos_0708_annotation_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0708_annotation_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..361fb0680385486db566bd0644359c9c00e9a353 --- /dev/null +++ b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xml @@ -0,0 +1,2 @@ + +test \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fe4d6b6c0bb9cc24c80fa05534add3371076a5eb --- /dev/null +++ b/xml/07_mapping_xsd_components/0708_annotation/Pos_0708_annotation_001/Pos_0708_annotation_001.xsd @@ -0,0 +1,10 @@ + + + + Note + This is a helping note! + + + diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..84040f2a9cbbeb6f6013b68c43ba7534df2f99b3 --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.ttcn @@ -0,0 +1,94 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify conversion of group definition with sequence compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with a sequence compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_001 { + + import from schema_Pos_0709_group_components_001 language "XSD" all; + + template ShipAndBill m_groupContent := { + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + } + template MyType m_msg := { + shipAndBill_list := { m_groupContent } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_001.xml", { "Pos_0709_group_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..d42454a226ee2fd9becae9df20e696d2f792f047 --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xml @@ -0,0 +1,5 @@ + + + New York + SuperMegaCorp Inc. + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c5a837886c4aed9c74639d62d8d0ddb56220a07d --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_001/Pos_0709_group_components_001.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e78a34f3a9dca4496d3381fd4554d01781fdef70 --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.ttcn @@ -0,0 +1,91 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify transformation of group definition with sequence compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with a choice compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_002 { + + import from schema_Pos_0709_group_components_002 language "XSD" all; + + template ShipOrBill m_shipOrBill := { shipTo := "New York" }; + template MyType m_msg := { + shipOrBill_list := { m_shipOrBill } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_002.xml", { "Pos_0709_group_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f9bf7e50e1dc2fc40db82001dc3751e722a1756f --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xml @@ -0,0 +1,4 @@ + + + New York + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..621b5508787b564c9a5bb29aa86478395bae4eb8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_002/Pos_0709_group_components_002.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6c9f98da791fa11742b39f2809e25d278c83e928 --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.ttcn @@ -0,0 +1,97 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.9, Verify conversion of group definition with all compositor + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// [XSD group definition with an all compositor] shall be mapped to TTCN-3 +// type definitions the same way as their child components would be mapped +// inside a complexType with one difference: the "untagged" encoding instruction +// shall be attached to the generated TTCN-3 component, corresponding to the +// group element. + +module Pos_0709_group_components_003 { + + import from schema_Pos_0709_group_components_003 language "XSD" all; + + template ShipAndBill m_groupContent := { + order := { billTo, shipTo }, + shipTo := "New York", + billTo := "SuperMegaCorp Inc." + } + template MyType m_msg := { + order := { billTo, shipTo }, + shipTo := m_groupContent.shipTo, + billTo := m_groupContent.billTo + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0709_group_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0709_group_components_003.xml", { "Pos_0709_group_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0709_group_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..5d89c7590d5015c8f9c631b0a37e19b504bf148f --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xml @@ -0,0 +1,5 @@ + + + SuperMegaCorp Inc. + New York + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9df0f59f8758c5d424dfa7f935e355a38b72b23b --- /dev/null +++ b/xml/07_mapping_xsd_components/0709_group_components/Pos_0709_group_components_003/Pos_0709_group_components_003.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c1aa1fc3cc3d66dabbe012f90f27841579d9913 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that unique elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_001 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_001 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitId := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitId := 30 + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_001.xml", { "Pos_0710_identity_constraint_definition_schema_components_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b549626bdb21087ec3833463046d0940e282ed8 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9ddfefaf85e0f8bb8cf33bbe7087776d52a995a6 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_001/Pos_0710_identity_constraint_definition_schema_components_001.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..858c0df230abae758f026a44a4e36bc3b95080aa --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.ttcn @@ -0,0 +1,98 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that key elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_002 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_002 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitId := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitId := 24 + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_002.xml", { "Pos_0710_identity_constraint_definition_schema_components_002.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_002(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..81066567d9f6bbb8494c59e929a2aeef625f2380 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4bd20d5251d2106f95c50d549a95570694e3db32 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_002/Pos_0710_identity_constraint_definition_schema_components_002.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3384635cf6b6c94e7cce312420c4b252e8640775 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.ttcn @@ -0,0 +1,107 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:7.10, Verify that keyRef elements (and nested selector and field) are ignored during conversion + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The XSD unique element enables to indicate that some XSD attribute or element +// values shall be unique within a certain scope. As TTCN-3 does not allow +// a similar relational value constraint, mapping of the unique, key and keyref +// elements are not supported by the present document, i.e. these elements shall +// be ignored in the translation process. + +module Pos_0710_identity_constraint_definition_schema_components_003 { + + import from schema_Pos_0710_identity_constraint_definition_schema_components_003 language "XSD" all; + + template MyType m_msg := { + unitInventory_list := { + { + item_list := { { 1004 }, { 1005 }, { 6028 }, { 7450 } }, + unitRef := 24 + }, { + item_list := { { 1011 }, { 1042 }, { 5301 }, { 6001 } }, + unitRef := 30 + } + }, + unitDesc_list := { + { + unitId := 24, + desc := "crucial unit" + }, { + unitId := 30, + desc := "very important unit" + } + } + }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_0710_identity_constraint_definition_schema_components_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_0710_identity_constraint_definition_schema_components_003.xml", { "Pos_0710_identity_constraint_definition_schema_components_003.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_0710_identity_constraint_definition_schema_components_003(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a7964711c922063207f364f7eae8a773058fc3d --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + crucial unit + + + very important unit + + \ No newline at end of file diff --git a/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d13f34e9c86638452c2a799da269df3479480358 --- /dev/null +++ b/xml/07_mapping_xsd_components/0710_identity/Pos_0710_identity_constraint_definition_schema_components_003/Pos_0710_identity_constraint_definition_schema_components_003.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2a438aa7f367660253ec3e7170ece806456bc1ed --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.ttcn @@ -0,0 +1,88 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.1 + ** @purpose 9:8.1.1, Generic substitution group example + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ +module Pos_080101_head_elements_of_substitution_groups_001 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_001 language "XSD" all; + + template Ize m_msg := { + head_list := { + { head := "anything" }, + { member1 := "any thing" }, + { member2 := something }, + { member3 := { bar:= 5, foo := omit, base := "anything else" } } + } + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_001.xml", { "Pos_080101_head_elements_of_substitution_groups_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..5cb8fc38498246e2a8bd177a8ea8204754e46dbd --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xml @@ -0,0 +1,4 @@ + + anything +any thing something anything else + \ No newline at end of file diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a4a41fb190a3481d42fdcf6d31b66b9f0f6dc43d --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_001/Pos_080101_head_elements_of_substitution_groups_001.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..57d49141fdfa96a2b78359667710a3987d7a86cc --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.ttcn @@ -0,0 +1,84 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:8.1.1, Show effect of the block and abstract attributes on element substitution + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ + +// The test is focused on encoding only. Decoding cannot be used as abstract and block attributes prevent it. + +module Pos_080101_head_elements_of_substitution_groups_002 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_002 language "XSD" all; + + template Ize m_msg := { + head_list := { + { head := "anything" }, + { member1 := "any thing" }, + { member2 := something }, + { member3 := { bar:= 5, foo := omit, base := "anything else" } } + } + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_002() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.receive(Raw:?) -> value v_rcv { + log("XML message ", v_rcv); + // TODO: in order to enable the check, a validation tool update needed so that it can work without schemas + //if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_002.xml", {}, v_matchError)) { + setverdict(pass, "Decoded value matches reference XML"); + //} else { + // setverdict(fail, v_matchError); + //} + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml new file mode 100644 index 0000000000000000000000000000000000000000..f5ee406a6a3155ac3a8af28f4e01e60a24abdc00 --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xml @@ -0,0 +1,10 @@ + + + +anything + any thing + +something + akarmi +anything else + \ No newline at end of file diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3bc55b9a0388d83be5806a0b94df496125de2a5f --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_002/Pos_080101_head_elements_of_substitution_groups_002.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..467bd525396e4c55e62d795688ef3ac9613dacc6 --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.ttcn @@ -0,0 +1,83 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:8.1.1, Blocking substitution + ** @verdict pass accept, ttcn3verdict:pass + ** @configuration elem_subst + ***************************************************/ + +// The test is focused on encoding only. Decoding cannot be used as abstract and block attributes prevent it. + +module Pos_080101_head_elements_of_substitution_groups_003 { + + import from schema_Pos_080101_head_elements_of_substitution_groups_003 language "XSD" all; + + template Ize m_msg := { + headNoSubstition_list:= { + { headNoSubstition := "anything" }, + { groupMember1 := "any thing" }, + { groupMember2 := "something" } + } + } + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_080101_head_elements_of_substitution_groups_003() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.receive(Raw:?) -> value v_rcv { + log("XML message ", v_rcv); + // TODO: in order to enable the check, a validation tool update needed so that it can work without schemas + //if (matchFile(v_rcv, "Pos_080101_head_elements_of_substitution_groups_003.xml", {}, v_matchError)) { + setverdict(pass, "Decoded value matches reference XML"); + //} else { + // setverdict(fail, v_matchError); + //} + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_080101_head_elements_of_substitution_groups_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f0404a945050e60cc592e9afcbd0ac6ff4731d1 --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xml @@ -0,0 +1,8 @@ + + + anything + +any thing + +something + \ No newline at end of file diff --git a/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd new file mode 100644 index 0000000000000000000000000000000000000000..9daba42f429d2567d22fdae2cbc8174abbcfb425 --- /dev/null +++ b/xml/08_substitutions/0801_element_substitution/080101_head_elements_of_substitution_groups/Pos_080101_head_elements_of_substitution_groups_003/Pos_080101_head_elements_of_substitution_groups_003.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c296dfa6dd0eca99cca907724b7a54fd1b83f03 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_001/Neg_A_ttcn3_module_xsd_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnySimpleType allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_001 { + + import from XSD all; + + template AnySimpleType m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_001() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6a32832e305ff8abc74fc14a6119d355053ea867 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_002/Neg_A_ttcn3_module_xsd_002.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnyType allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_002 { + + import from XSD all; + + template AnyType m_msg := {{2},{1}} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_002() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bac6c4e75c9e55ca15568133796b74c7df2de39b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_003/Neg_A_ttcn3_module_xsd_003.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type String allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_003 { + + import from XSD all; + + template String m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_003() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..86a623c146fa054ea0662ab2420a390764dd60f3 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_004/Neg_A_ttcn3_module_xsd_004.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NormalizedString allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_004 { + + import from XSD all; + + template NormalizedString m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_004() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dc2bb180f21cf075c4caab7154843bdcdbe75ffd --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_005/Neg_A_ttcn3_module_xsd_005.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Token allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_005 { + + import from XSD all; + + template Token m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_005() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..de1aaae0b90a5842bd8c1b6f3e9dd6ccfd17f41b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_006/Neg_A_ttcn3_module_xsd_006.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Name allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_006 { + + import from XSD all; + + template Name m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_006() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d250ad9322d56d044d6ea258fe1e28446c66944f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_007/Neg_A_ttcn3_module_xsd_007.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NMTOKEN allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_007 { + + import from XSD all; + + template NMTOKEN m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_007() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a42c30f35878bc9eaea61f7e052cc826d58e0304 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_008/Neg_A_ttcn3_module_xsd_008.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NCName allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_008 { + + import from XSD all; + + template NCName m_msg := "string with whitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_008() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..13d796bd63b34a9cfe75654614741985501b6a4c --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_009/Neg_A_ttcn3_module_xsd_009.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ID allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_009 { + + import from XSD all; + + template ID m_msg := "12 34"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_009() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..40a30ce214cf77d0fe302ab04f6b2d18a95e9660 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_010/Neg_A_ttcn3_module_xsd_010.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type IDREF allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_010 { + + import from XSD all; + + template IDREF m_msg := "ID Reference"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_010() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..21c921130b7794f8efd9951f84b78606e14949f2 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_011/Neg_A_ttcn3_module_xsd_011.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ENTITY allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_011 { + + import from XSD all; + + template ENTITY m_msg := "My Entity"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_011() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..de867333309e44592169588104ac1ffda6cb39c7 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_012/Neg_A_ttcn3_module_xsd_012.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type HexBinary allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_012 { + + import from XSD all; + + template HexBinary m_msg := 11; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_012() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a79577178bab440c688715a852fcdb676b9db5fc --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_013/Neg_A_ttcn3_module_xsd_013.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Base64Binary allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_013 { + + import from XSD all; + + template Base64Binary m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_013() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_013(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5cd48d8573bb28a2b9314ec8d83fc0a75d442662 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_014/Neg_A_ttcn3_module_xsd_014.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type AnyURI allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_014 { + + import from XSD all; + + template AnyURI m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_014() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_014(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e35753bda66d6a56295e62886bd41b289aed226d --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_015/Neg_A_ttcn3_module_xsd_015.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Language allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_015 { + + import from XSD all; + + template Language m_msg := "TTCN 3"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_015() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_015(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5e0b1dda4e66c1d9c96a066053e965d3e80f5b1b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_016/Neg_A_ttcn3_module_xsd_016.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Integer allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_016 { + + import from XSD all; + + template Integer m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_016() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_016(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1bdf545b5d0a705b2215130e17d648cd1dae4ad2 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_017/Neg_A_ttcn3_module_xsd_017.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type PositiveInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_017 { + + import from XSD all; + + template PositiveInteger m_msg := -12; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_017() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_017(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..309e710b42954abefb69201ba7c6c0e0cc909311 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_018/Neg_A_ttcn3_module_xsd_018.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NonPositiveInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_018 { + + import from XSD all; + + template NonPositiveInteger m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_018() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_018(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f93626e5b6486d7b7a8c707b9f1cdd49858fb3b4 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_019/Neg_A_ttcn3_module_xsd_019.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NegativeInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_019 { + + import from XSD all; + + template NegativeInteger m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_019() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_019(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c491dfe23e127c5df63a39cdd070c51da5655ff6 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_020/Neg_A_ttcn3_module_xsd_020.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NonNegativeInteger allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_020 { + + import from XSD all; + + template NonNegativeInteger m_msg := -1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_020() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_020(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25f7e6ebda879900b60204d1e89bf7397e191346 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_021/Neg_A_ttcn3_module_xsd_021.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Long allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_021 { + + import from XSD all; + + template Long m_msg := "1"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_021() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_021(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..38665a536d82e5144d11a2d0785f84ae470aaa19 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_022/Neg_A_ttcn3_module_xsd_022.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedLong allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_022 { + + import from XSD all; + + template UnsignedLong m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_022() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_022(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0fab13f410ca9119f15eb4762658f8a0f16bc9ef --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_023/Neg_A_ttcn3_module_xsd_023.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Int allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_023 { + + import from XSD all; + + template Int m_msg := 3.3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_023() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_023(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9ae011ccae5b1d26c6e7ad08cd24b3c5d36d990e --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_024/Neg_A_ttcn3_module_xsd_024.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedInt allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_024 { + + import from XSD all; + + template UnsignedInt m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_024() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_024(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2dea143bec5ef1aab709f6916b7ae122b0478739 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_025/Neg_A_ttcn3_module_xsd_025.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Short allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_025 { + + import from XSD all; + + template Short m_msg := 32770; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_025() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_025(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53da4c90b2dd3ebecfda40aec53d11c0208794be --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_026/Neg_A_ttcn3_module_xsd_026.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedShort allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_026 { + + import from XSD all; + + template UnsignedShort m_msg := -2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_026() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_026(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d332bf83718710ed0acaf8fff40299f2e8c29dba --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_027/Neg_A_ttcn3_module_xsd_027.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Byte allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_027 { + + import from XSD all; + + template Byte m_msg := 130; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_027() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_027(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7972df9d035ffc47ea389d1bdd22210fc699a596 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_028/Neg_A_ttcn3_module_xsd_028.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type UnsignedByte allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_028 { + + import from XSD all; + + template UnsignedByte m_msg := -1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_028() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_028(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bef9680b82399695ec6c33978a363f95a82e28ec --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_029/Neg_A_ttcn3_module_xsd_029.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Decimal allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_029 { + + import from XSD all; + + template Decimal m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_029() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_029(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7d5e370ae1f7c8937c4ddf3816ea76f9b142a249 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_030/Neg_A_ttcn3_module_xsd_030.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Float allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_030 { + + import from XSD all; + + template Float m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_030() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_030(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7550a75f16947fcec6be6062e53ee72b1cf5128a --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_031/Neg_A_ttcn3_module_xsd_031.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Double allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_031 { + + import from XSD all; + + template Double m_msg := 1; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_031() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_031(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..876406b85ed9254a693e98daf55b0641111215ec --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_032/Neg_A_ttcn3_module_xsd_032.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Duration allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_032 { + + import from XSD all; + + template Duration m_msg := "30 min"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_032() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_032(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1dc25a535a06c4d3218f1f913cda7a20ea2f84b5 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_033/Neg_A_ttcn3_module_xsd_033.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type DateTime allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_033 { + + import from XSD all; + + template DateTime m_msg := "14-12-12-12:00:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_033() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_033(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c58c6d3cb6a2163c57c6359a6d64a024fbd4e2f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_034/Neg_A_ttcn3_module_xsd_034.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Time allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_034 { + + import from XSD all; + + template Time m_msg := "66:66"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_034() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_034(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e6c0c7108dd1d5c65176773273fa7ca86aeb453d --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_035/Neg_A_ttcn3_module_xsd_035.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Date allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_035 { + + import from XSD all; + + template Date m_msg := "14.13.13"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_035() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_035(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..608ea77d97dd10c7cb23dadaddb4d4c84d581734 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_036/Neg_A_ttcn3_module_xsd_036.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GYearMonth allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_036 { + + import from XSD all; + + template GYearMonth m_msg := "14-13"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_036() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_036(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b73e3dc084c7972682a3bcacba01b93dbff44626 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_037/Neg_A_ttcn3_module_xsd_037.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GYear allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_037 { + + import from XSD all; + + template GYear m_msg := "14"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_037() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_037(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8de5dce2049ec256d5c23ca3334dc8c6c24d9abd --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_038/Neg_A_ttcn3_module_xsd_038.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GMonthDay allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_038 { + + import from XSD all; + + template GMonthDay m_msg := "12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_038() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_038(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4b99942e7bb297bccdcb4981238ac02168e38a88 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_039/Neg_A_ttcn3_module_xsd_039.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GDay allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_039 { + + import from XSD all; + + template GDay m_msg := "18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_039() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_039(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d9f052fe0cbf2e1e4718c72283c391367e893a33 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_040/Neg_A_ttcn3_module_xsd_040.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type GMonth allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_040 { + + import from XSD all; + + template GMonth m_msg := "12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_040() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_040(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..826e91e7b65d8cba80807df40082f99e105ddd93 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_041/Neg_A_ttcn3_module_xsd_041.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type NMTOKENS allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_041 { + + import from XSD all; + + template NMTOKENS m_msg := {1, 2} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_041() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_041(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..139280b108906c6da44b5314a62e73c91c2fd2b9 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_042/Neg_A_ttcn3_module_xsd_042.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type IDREFS allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_042 { + + import from XSD all; + + template IDREFS m_msg := {"1 2 3"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_042() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_042(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3fad1d12ac2c0cf7376b7350e89be3dd3307d411 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_043/Neg_A_ttcn3_module_xsd_043.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type ENTITIES allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_043 { + + import from XSD all; + + template ENTITIES m_msg := {"entity_1 , entity_2"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_043() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_043(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..56fee9f22bccca182775883ab1c41bf6e4b9d387 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_044/Neg_A_ttcn3_module_xsd_044.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type QName allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_044 { + + import from XSD all; + + template QName m_msg := {"", "name with whitespace"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_044() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_044(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8eae44e07f3763cf0d00b8e6706a934af10e9746 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_045/Neg_A_ttcn3_module_xsd_045.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type Boolean allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_045 { + + import from XSD all; + + template Boolean m_msg := fail; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_045() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_045(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..58313057b3598a1d0edc7ab3df15feb328412e9b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_046/Neg_A_ttcn3_module_xsd_046.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLCompatibleString allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_046 { + + import from XSD all; + + template XMLCompatibleString m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_046() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_046(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ffd5c862bb746b9b0b95b02c635255da01ecca8a --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_047/Neg_A_ttcn3_module_xsd_047.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLStringWithNoWhitespace allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_047 { + + import from XSD all; + + template XMLStringWithNoWhitespace m_msg := "a b c"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_047() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_047(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20436eb08680bfec40990ca188c7ce5072116b53 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Neg_A_ttcn3_module_xsd_048/Neg_A_ttcn3_module_xsd_048.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the builtin XSD type XMLStringWithNoCRLFHT allows only valid values + ** @verdict pass reject + ***************************************************/ +module Neg_A_ttcn3_module_xsd_048 { + + import from XSD all; + + template XMLStringWithNoCRLFHT m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Neg_A_ttcn3_module_xsd_048() runs on C system C { + // set a verdict before since valueof should throw error + setverdict(fail, "Should not be able to create an invalid value of the given built-in XSD type", m_msg); + log(valueof(m_msg)); // if testcase is compiling, valueof is expected to throw an testcase error since the value is invalid + } + + control { + execute(TC_Neg_A_ttcn3_module_xsd_048(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3e560d3a5f7ad130f359bbd8f7f609be398aaa36 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_001/Pos_A_ttcn3_module_xsd_001.ttcn @@ -0,0 +1,38 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnySimpleType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_001 { + + import from XSD all; + + template AnySimpleType m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_001() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_001(), PX_TC_EXECUTION_TIMEOUT); + } + +} + diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6babfd8d263c0048a9b3c8e0a914d2376228ab5f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_002/Pos_A_ttcn3_module_xsd_002.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475, updated by STF 521 + ** @version 0.0.2 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnyType + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_002 { + + import from XSD all; + + template AnyType m_msg := {embed_values := omit, attr := omit, elem_list := {"a"}} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_002() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_002(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..99e6598de008441ceb45d8890bf8878f43820968 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_003/Pos_A_ttcn3_module_xsd_003.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type String + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_003 { + + import from XSD all; + + template String m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_003() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_003(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a571951919c4cd452df0a0b3f37aa222d74428c6 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_004/Pos_A_ttcn3_module_xsd_004.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NormalizedString + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_004 { + + import from XSD all; + + template NormalizedString m_msg :="abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_004() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_004(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e39421f95a8e660044308a16b25f6d5e580ce405 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_005/Pos_A_ttcn3_module_xsd_005.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Token + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_005 { + + import from XSD all; + + template Token m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_005() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_005(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..809796400b903ab2b7720305ef0b3b953830b18a --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_006/Pos_A_ttcn3_module_xsd_006.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Name + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_006 { + + import from XSD all; + + template Name m_msg := "name"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_006() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_006(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..507ba82d44b24604bc8270c401be5e78601025bd --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_007/Pos_A_ttcn3_module_xsd_007.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NMTOKEN + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_007 { + + import from XSD all; + + template NMTOKEN m_msg := "NMToken"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_007() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_007(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d054ae4bb21918b974c41467e86fc9fb918215e --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_008/Pos_A_ttcn3_module_xsd_008.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NCName + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_008 { + + import from XSD all; + + template NCName m_msg := "SomeName-WithoutSpace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_008() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_008(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa4acaba72798c10b0383d78d7883ee8d6a3dda6 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_009/Pos_A_ttcn3_module_xsd_009.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ID + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_009 { + + import from XSD all; + + template ID m_msg := "1234"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_009() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_009(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..18e9bbe8851e35ae70d136956c3bc04982b8c012 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_010/Pos_A_ttcn3_module_xsd_010.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type IDREF + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_010 { + + import from XSD all; + + template IDREF m_msg := "ID-Reference"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_010() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_010(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..19cbdc264f8637e4aad62629aa4f8b6e722f3958 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_011/Pos_A_ttcn3_module_xsd_011.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ENTITY + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_011 { + + import from XSD all; + + template ENTITY m_msg := "MyEntity"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_011() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_011(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..95cd9047bd6ca96d62bd97d6113d82caca94d999 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_012/Pos_A_ttcn3_module_xsd_012.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type HexBinary + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_012 { + + import from XSD all; + + template HexBinary m_msg := '11001100'O; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_012() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_012(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4ff950df6100e48b02911a279094d5df1893e8bb --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_013/Pos_A_ttcn3_module_xsd_013.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Base64Binary + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_013 { + + import from XSD all; + + template Base64Binary m_msg := 'A12654778899'O; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_013() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_013(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1412e4cf563146cc3dabc4c116029b5ea0864b2f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_014/Pos_A_ttcn3_module_xsd_014.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type AnyURI + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_014 { + + import from XSD all; + + template AnyURI m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_014() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_014(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ab9879f983467dad3453d5c20fe3844be5b3ddbb --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_015/Pos_A_ttcn3_module_xsd_015.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Language + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_015 { + + import from XSD all; + + template Language m_msg := "De-AT"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_015() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_015(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7fbdbbf33e98b3ee20be3380487cf2a56114a91e --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_016/Pos_A_ttcn3_module_xsd_016.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Integer + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_016 { + + import from XSD all; + + template Integer m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_016() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_016(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..62ed0f1ad57191b78514c9a3c1197a692e0236d3 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_017/Pos_A_ttcn3_module_xsd_017.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type PositiveInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_017 { + + import from XSD all; + + template PositiveInteger m_msg := 12; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_017() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_017(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ef8928dec81652e47cc0243b01bd659b8748febc --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_018/Pos_A_ttcn3_module_xsd_018.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NonPositiveInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_018 { + + import from XSD all; + + template NonPositiveInteger m_msg := -3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_018() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_018(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..65e21a9f43859e6cebf2fc8f81f38618b5293d4a --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_019/Pos_A_ttcn3_module_xsd_019.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NegativeInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_019 { + + import from XSD all; + + template NegativeInteger m_msg := -10; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_019() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_019(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..419d70c029151f757692b2364bb5f169b87f5c79 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_020/Pos_A_ttcn3_module_xsd_020.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NonNegativeInteger + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_020 { + + import from XSD all; + + template NonNegativeInteger m_msg := 2; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_020() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_020(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..500ced4f635f594b72c537a7854a5ad0592e2800 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_021/Pos_A_ttcn3_module_xsd_021.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Long + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_021 { + + import from XSD all; + + template Long m_msg := 123; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_021() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_021(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..59d768c02949c02874fa894def146b59873a84aa --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_022/Pos_A_ttcn3_module_xsd_022.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedLong + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_022 { + + import from XSD all; + + template UnsignedLong m_msg := 10; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_022() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_022(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fe1edc392a0e7dfe67af9a0658f74b7698b01f1b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_023/Pos_A_ttcn3_module_xsd_023.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Int + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_023 { + + import from XSD all; + + template Int m_msg := 23; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_023() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_023(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f82646868d18cb4f63058c29766e56890298e235 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_024/Pos_A_ttcn3_module_xsd_024.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedInt + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_024 { + + import from XSD all; + + template UnsignedInt m_msg := 3; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_024() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_024(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b7a590ba2c9689ee78fd69581e59829f0c33814a --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_025/Pos_A_ttcn3_module_xsd_025.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Short + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_025 { + + import from XSD all; + + template Short m_msg := 32767; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_025() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_025(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..accf05722257634206884645dad5c7930107bb62 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_026/Pos_A_ttcn3_module_xsd_026.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedShort + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_026 { + + import from XSD all; + + template UnsignedShort m_msg := 65535; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_026() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_026(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ed145abba84473e9172ba87c858e42fc88e7bb8 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_027/Pos_A_ttcn3_module_xsd_027.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Byte + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_027 { + + import from XSD all; + + template Byte m_msg := 127; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_027() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_027(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ecb8d3942afe4eb48ce92519f32957dc00691f25 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_028/Pos_A_ttcn3_module_xsd_028.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type UnsignedByte + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_028 { + + import from XSD all; + + template UnsignedByte m_msg := 255; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_028() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_028(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9fd59a47bec655b96dcceb74b3db245ae213d0a5 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_029/Pos_A_ttcn3_module_xsd_029.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Decimal + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_029 { + + import from XSD all; + + template Decimal m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_029() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_029(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b01e061e143c856ef514bb1954a2784e6e2c827f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_030/Pos_A_ttcn3_module_xsd_030.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Float + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_030 { + + import from XSD all; + + template Float m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_030() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_030(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..930dd107e30b6069b9eab2cb3475917957ea6c4e --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_031/Pos_A_ttcn3_module_xsd_031.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Double + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_031 { + + import from XSD all; + + template Double m_msg := 1.0; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_031() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_031(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..017a96b38d348d39e562d18a9b264bb8a98ec677 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_032/Pos_A_ttcn3_module_xsd_032.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Duration + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_032 { + + import from XSD all; + + template Duration m_msg := "P1Y2M2DT2H22M"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_032() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_032(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..751c9ba083298407bddd95be392350851441252b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_033/Pos_A_ttcn3_module_xsd_033.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type DateTime + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_033 { + + import from XSD all; + + template DateTime m_msg := "2014-12-12T12:00:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_033() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_033(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0acb7dc5fb760079496e6d56a85abbc9a77799bf --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_034/Pos_A_ttcn3_module_xsd_034.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Time + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_034 { + + import from XSD all; + + template Time m_msg := "12:12:00-05:00"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_034() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_034(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e16d5d1b8398e3fc88fceb21e4a21928cc1ef33f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_035/Pos_A_ttcn3_module_xsd_035.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Date + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_035 { + + import from XSD all; + + template Date m_msg := "2014-12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_035() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_035(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..082e18072018d7de7286186ab6366fb94e6743c6 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_036/Pos_A_ttcn3_module_xsd_036.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GYearMonth + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_036 { + + import from XSD all; + + template GYearMonth m_msg := "2014-12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_036() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_036(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aae7e6802f0e9fbefaf53bf936d4d113167d54ce --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_037/Pos_A_ttcn3_module_xsd_037.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GYear + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_037 { + + import from XSD all; + + template GYear m_msg := "2014"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_037() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_037(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..863677cfc0edcc89210527d91e946f02911643a0 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_038/Pos_A_ttcn3_module_xsd_038.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GMonthDay + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_038 { + + import from XSD all; + + template GMonthDay m_msg := "--12-18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_038() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_038(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..00a90f96d9359c472d347db098171b346d5a9993 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_039/Pos_A_ttcn3_module_xsd_039.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GDay + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_039 { + + import from XSD all; + + template GDay m_msg := "---18"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_039() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_039(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9894f46372400a5c9ba652c61effcd09424630e1 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_040/Pos_A_ttcn3_module_xsd_040.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type GMonth + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_040 { + + import from XSD all; + + template GMonth m_msg := "--12"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_040() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_040(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3f682b92015f9973730d6f918252ef2956ba1bfa --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_041/Pos_A_ttcn3_module_xsd_041.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type NMTOKENS + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_041 { + + import from XSD all; + + template NMTOKENS m_msg := {"a", "b"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_041() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_041(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b1c392b03c9663933ce62a772cfd22ff8deded66 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_042/Pos_A_ttcn3_module_xsd_042.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type IDREFS + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_042 { + + import from XSD all; + + template IDREFS m_msg := {"123"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_042() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_042(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4eea69dd130bf78482536bccb21fb8b7b2389ab8 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_043/Pos_A_ttcn3_module_xsd_043.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type ENTITIES + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_043 { + + import from XSD all; + + template ENTITIES m_msg := {"entity_1", "entity_2"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_043() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_043(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..41611a11493420d73250eab76cb8c6508bc59118 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_044/Pos_A_ttcn3_module_xsd_044.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type QName + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_044 { + + import from XSD all; + + template QName m_msg := {"http://example.com", "name"} + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_044() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_044(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..955007e215ffc95e15320899291b4ee5a3574039 --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_045/Pos_A_ttcn3_module_xsd_045.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type Boolean + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_045 { + + import from XSD all; + + template Boolean m_msg := true; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_045() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_045(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..59911d0ea7a3b982dee697862b75430e7631247d --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_046/Pos_A_ttcn3_module_xsd_046.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLCompatibleString + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_046 { + + import from XSD all; + + template XMLCompatibleString m_msg := "x"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_046() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_046(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..570143ecba75f3142b716c2d199dd6ef060eb85b --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_047/Pos_A_ttcn3_module_xsd_047.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoWhitespace + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_047 { + + import from XSD all; + + template XMLStringWithNoWhitespace m_msg := "StringWithNoWhitespace"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_047() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_047(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ce9dffb71ebea343ff303f8d784bd9a0a161ab8f --- /dev/null +++ b/xml/A_ttcn3_module_xsd/Pos_A_ttcn3_module_xsd_048/Pos_A_ttcn3_module_xsd_048.ttcn @@ -0,0 +1,37 @@ +/*************************************************** + ** @author STF 475 + ** @version 0.0.1 + ** @purpose 9:A, Ensure the module XSD is available and contains the builtin XSD type XMLStringWithNoCRLFHT + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_A_ttcn3_module_xsd_048 { + + import from XSD all; + + template XMLStringWithNoCRLFHT m_msg := "abc"; + + + + /** + * @desc The timeout given in seconds after which the test case will be stopped. + */ + modulepar float PX_TC_EXECUTION_TIMEOUT := 5.0; + + type component C { + } + + testcase TC_Pos_A_ttcn3_module_xsd_048() runs on C system C { + + // encode the message + if (isvalue(m_msg)) { + setverdict(pass, "Built-in XSD type was found and TCI value was created"); + } else { + setverdict(fail, "Failure to create a value of the given built-in XSD type"); + } + } + + control { + execute(TC_Pos_A_ttcn3_module_xsd_048(), PX_TC_EXECUTION_TIMEOUT); + } + +} diff --git a/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c05e765e923faa59caf6cf612452fe5ad6c59864 --- /dev/null +++ b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.ttcn @@ -0,0 +1,90 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:B.3.27, The noType insturction overriding "useUnion" + ** @verdict pass accept, ttcn3verdict:pass +***************************************************/ +// The following requirements are tested: +// The "noType" encoding variant can be applied to any TTCN-3 value or template, +// where normally an xsi:type attribute would be generated when encoding this element +// (see clause 5.1.5). This is normally the result of the "useType" or "useUnion" +// encoding instructions appended to the type of the value or template. This is +// especially useful for suppressing the type identification attribute for elements +// derived from simpleType via union. The "noType" encoding instruction takes +// precedence over the "useType" and "useUnion" encoding instructions. + +module Pos_B0327_no_type_001 { + + import from schema_Pos_B0327_no_type_001 language "XSD" all; + + template MyType m_msg := { integer_ := 5 } with { variant "noType" }; + + + + /** + * @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 universal charstring File; + type record of File FileList; + + type port P message { + inout all; + } + type component C { + port P p; + } + + /** + * @desc lexical compare the charstring p_textToMatch with the contents of the reference XML file and returns true if they represent the same XML structure + * @param p_textToMatch text to be compared with the UTF-8 contents of the XML file + * @param p_referenceXmlFile the XML file + * @param p_xsdFileList the list of XSD files + * @param p_matchError the error result in case it did not match + * @param p_referenceTTCN3File the file of the TTCN-3 test module. This path is used to find the reference XML file relative to this path, by keeping the TTCN-3 code file system independent. + * @return true if p_textToMatch and the contents of p_referenceXmlFile represent the same XML structure + */ + external function matchFile(Raw p_textToMatch, File p_referenceXmlFile, FileList p_xsdFileList, out universal charstring p_matchError, File p_referenceTTCN3File := __FILE__) return boolean; + + testcase TC_Pos_B0327_no_type_001() runs on C system C { + var Raw v_rcv; + var universal charstring v_matchError; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + // compare the encoded message with the reference XML file + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + if (matchFile(v_rcv, "Pos_B0327_no_type_001.xml", { "Pos_B0327_no_type_001.xsd" }, v_matchError)) { + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template and reference XML"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } else { + setverdict(fail, v_matchError); + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Pos_B0327_no_type_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml new file mode 100644 index 0000000000000000000000000000000000000000..a22095dc61e1c980f75e1a450bc36e9e100637ad --- /dev/null +++ b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xml @@ -0,0 +1,2 @@ + +5 \ No newline at end of file diff --git a/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4ee22e343baff4f7aaa45c3a5e33a4349c4bfdf9 --- /dev/null +++ b/xml/B_encoding_instructions/B03_encoding_instructions/B0327_no_type/Pos_B0327_no_type_001/Pos_B0327_no_type_001.xsd @@ -0,0 +1,9 @@ + + + + + + + diff --git a/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn b/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..094ab2f82ad423ce02acf55fe783d2291bd257e7 --- /dev/null +++ b/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_001/B0329_xml_header_control_001.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Use of the xmlHeader parameter in the enc_value function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_B0329_xml_header_control_001 { + + import from schema_Pos_B0329_xml_header_control_001 language "XSD" all; + + template Test m_msg := "abc"; + + type component C { + } + + testcase TC_Pos_B0329_xml_header_control_001() runs on C { + var universal charstring v_encoded := encvalue_unichar(m_msg, -, "xmlHeader"); + // Naive test for XML header presence. If needed, more complicated one should be implemented + if (lengthof(v_encoded) >= 5 and substr(v_encoded, 0, 5) == " + + + diff --git a/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn b/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8865ce815db04f3dd65e627d69fbdf918dfacf56 --- /dev/null +++ b/xml/B_encoding_instructions/B03_encoding_instructions/B0329_xml_header_control/B0329_xml_header_control_002/B0329_xml_header_control_002.ttcn @@ -0,0 +1,26 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:6.2.1, Use of the noXmlHeader parameter in the enc_value function + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Pos_B0329_xml_header_control_002 { + + import from schema_Pos_B0329_xml_header_control_002 language "XSD" all; + + template Test m_msg := "abc"; + + type component C { + } + + testcase TC_Pos_B0329_xml_header_control_002() runs on C { + var universal charstring v_encoded := encvalue_unichar(m_msg, -, "noXmlHeader"); + // Naive test for XML header presence. If needed, more complicated one should be implemented + if (lengthof(v_encoded) >= 5 and substr(v_encoded, 0, 5) == " + + + diff --git a/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn b/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d0a3ad34a45e3517bdb2514ea35281989b5be0ce --- /dev/null +++ b/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.ttcn @@ -0,0 +1,68 @@ +/*************************************************** + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 9:7.5.1, Verify that XSD types cannot be encoded + ** @verdict pass reject +***************************************************/ +// The following requirements are tested: +// If templates or values of types with the "XML" encode attribute (or any of its synonyms +// – i.e. TTCN-3 types that are a result of conversion from XSD) are used as an argument of +// a communication operation, a variant attribute containing the "element" encoding instruction +// shall be assigned to it. Using a value or template of a type that doesn’t contain this +// encoding instruction shall cause an error. + +module Neg_B_top_level_001 { + + import from schema_Neg_B_top_level_001 "XSD" all; + + template Elem_simple_restr m_msg := 1; + + + + /** + * @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_B_top_level_001() runs on C system C { + var Raw v_rcv; + + map(self:p, system:p); + + // encode the message + p.send(m_msg); + + alt { + [] p.check(receive(Raw:?) -> value v_rcv) { + log("XML message ", v_rcv); + alt { + // match decoded value to pass test + [] p.receive(m_msg) { + setverdict(pass, "Decoded value matches encoded template"); + } + [] p.receive { + setverdict(fail, "XML decoding failure"); + } + } + } + [] p.receive { + setverdict(fail, "Raw decoding failure"); + } + } + } + + control { + execute(TC_Neg_B_top_level_001(), PX_TC_EXECUTION_TIMEOUT); + } + + +} diff --git a/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd b/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..03ea0acf9b61a543cbd0078a36d94709231bd186 --- /dev/null +++ b/xml/B_encoding_instructions/B_top_level/Neg_B_top_level_001/Neg_B_top_level_001.xsd @@ -0,0 +1,8 @@ + + + + + + diff --git a/xml/README.txt b/xml/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..f5de2fec99c6f70335b4ce556865078fe37aa427 --- /dev/null +++ b/xml/README.txt @@ -0,0 +1,92 @@ +TTCN-3 Part 9 (XML) conformance test suite preliminary (unofficial) instructions +======================================================= + +These are preliminary instructions on how to use the TTCN-3 conformance test suite. +Unlike ATSs in the usual context, this ATS does _not_ provide any means for test +automation, but the TTCN-3 files provide the test inputs for the TTCN-3 tool - in this case +the TTCN-3 tool is the IUT. This means that test automation has to be somehow scripted, however, +from the provided ATS it should be clear how the output should be interpreted. + +1) ATS organization + + The ATS is organized according to the clauses of the TTCN-3 standard part 1. There are + either positive syntactic tests, negative syntactic tests, positive semantic tests, or + negative semantic tests. + + Except for the negative syntactic tests, all TTCN-3 files from the other three categories + are always syntactically correct. In addition, the positive syntactic tests are designed + to be semantically correct as well. The negative semantic tests are designed to violate the + semantics only in the one property that is subject of the test - at least to the degree that + it is possible. Because all test cases are syntactically correct (except for the negative + syntactic tests), the semantic and negative semantic tests are syntactically correct as well. + + Every TTCN-3 module corresponds to one TTCN-3 conformance test. Where more than one module is + needed, the TTCN-3 file contains multiple modules. + +2) Document tags + + Every module is annotated with document tags. Of relevance for the test automation tooling + is the @verdict tag on top of each module (tag usage adaption in the TTCN-3 maintenance STF + is pending). It is composed of three parts: the tag, the conformance verdict, and keywords + regarding the expected output. + + @verdict pass accept, ttcn3verdict:pass + + Hence the format of this tag is a three column entry with "@verdict", "pass", and + "accept, ttcn3verdict:pass, manual:'Freetext validation'". + In order to reach the "pass" verdict, the TTCN-3 tool under test, the IUT, must accept the + TTCN-3 module as test input. The result of its execution must be the TTCN-3 verdict pass. + When needed, a manual inspection of the execution results is required. + Therefore, if the TTCN-3 verdict is pass after the execution of the module, the IUT passes + the conformance test. If the tool output is anything else, or it does not comply + with the manual inspection, it fails the conformance test. + + The keywords in use to describe the third column, i.e. the expected output by the IUT, are (currently) as + follows: + + reject + accept, noexecution + accept, ttcn3verdict:none + accept, ttcn3verdict:pass + accept, ttcn3verdict:inconc + accept, ttcn3verdict:fail + accept, ttcn3verdict:error + accept, ttcn3verdict:xxx, manual:"Validation inspection, free text" (see Note) + + Note: 'xxx' for ttcn3verdict is a placeholder for verdict value. The actual test cases must + have one of the allowed values 'none', 'pass', 'inconc', 'fail', or 'error' in place of 'xxx'. + + "reject" implies that the TTCN-3 module is either rejected at compile-time or at execution time. + In the conformance test, we do not differentiate between these two cases as the standard does not + make any statement where semantic checks have to be performed. + + "accept, noexecution" implies that the TTCN-3 module should be accepted by the TTCN-3 tool after + the syntactic check. For passing the conformance test, the module simply has to be accepted and + an execution is not necessary. + + "accept, ttcn3vercit:xxx" implies that the TTCN-3 module should be accepted by the TTCN-3 tool + after the syntactic check and that an execution should take place. The result of the execution + should be a TTCN-3 verdict and the "xxx" denotes what verdict is the exepcted verdict. If the + verdict differs from the specified "xxx", the conformance test fails. Otherwise, it passes. + + In the usual case, each TTCN-3 file contains only one test case. In these cases the verdict + determination is clear. In a few cases, the TTCN-3 file contains more than one test case. + In that case, the overall conformance verdict is determined according to the TTCN-3 verdict + overwrite rules applied to the results of each test case. Let's say we have two test cases. + The first test case ends with the verdict "fail" and the second one ends with the verdict "pass". + Then the overall verdict is "fail". + + The manual results inspection is a free text describing how a valid out should look like. The text + is informal since different tools have different logging formats and facilities. The instruction + is surrounded by single or double quotas on a single line: + + @verdict pass, testverdict:pass, manual:'The following elements are logged: charstring "Extra", record { 1, "HELLO"}, integer template "?". Make sure the elements are logged at setverdict, at MTC end, and at test case end.' + + All notations are designed to be easily machine readable. Therefore, the test automation using + some sort of scripting will only take a small amount of time. + +3) Other prerequisites + + In order to test communication and matching behavior, we expect that the test cases are executed + using a loopback adapter. +
\r\n" + + "

{{CHAPTER}}

\r\n" + + "
\r\n" + + "

{{CLAUSE}}

\r\n" + + "
\r\n" + + "

{{CLAUSE}}

\r\n" + + "
\r\n" + + "

{{TESTCASE}}

\r\n" + + "