1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
15 ******************************************************************************/
17 //=========================================================================
18 // References: (XSD_0) XML Schema Part 0: Primer Second Edition
19 // (XSD_1) XML Schema Part 1: Structures Second Edition
20 // (XSD_2) XML Schema Part 2: Datatypes Second Edition
21 // (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3;
22 // Part 9: Using XML schema with TTCN-3
23 // Last modified: 2013-12-02 by ethbaat
24 // Temporarily commented out: tc_complex_import_withSL_encDec fails on some platforms because of TR:HR88527
26 module xmlTest_Testcases
29 //=========================================================================
31 //=========================================================================
32 //import from XSD all;
33 import from PIPEasp_Types all;
34 import from PIPEasp_PortType all;
35 import from PIPEasp_Templates all;
36 import from xmlTest_Shell all;
38 import from www_XmlTest_org_element_anyType_e all;
39 import from www_XmlTest_org_complex_all_e all;
40 import from www_XmlTest_org_complex_extension_e all;
41 import from www_XmlTest_org_complex_restriction_e all;
42 import from www_XmlTest_org_complex_import_e all;
43 import from www_XmlTest_org_complex_any_e all;
45 import from xmlTest_Functions_string all;
46 import from xmlTest_Functions_complex1 all;
47 import from xmlTest_Functions_complex2 all;
48 import from xmlTest_Functions_complex all;
49 import from xmlTest_Functions_element all;
50 import from xmlTest_Functions_list all;
53 //=========================================================================
55 //=========================================================================
57 // Insert module parameters here if applicable!
58 // You can use the module_param skeleton!
60 //=========================================================================
62 //=========================================================================
64 // Insert data type defintions here if applicable!
65 // You can use the data_type skeleton!
67 //=========================================================================
69 //=========================================================================
71 // Insert signature definitions here if applicable!
72 // You can use the signature skeleton!
74 //=========================================================================
76 //=========================================================================
78 // Insert port type defintions here if applicable!
79 // You can use the port_type skeleton!
81 //=========================================================================
83 //=========================================================================
85 type component xmlTest_CT extends Shell_CT {}
87 type component mtc_CT {}
88 //=========================================================================
90 //=========================================================================
93 //=========================================================================
95 //=========================================================================
97 // Insert templates here if applicable!
98 // You can use the template skeleton!
100 //=========================================================================
102 //=========================================================================
104 // Insert altsteps here if applicable!
105 // You can use the altstep skeleton!
107 //=========================================================================
109 //=========================================================================
111 //=========================================================================
113 //=========================================================================
114 function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) {
117 var integer vl_size:=lengthof(pl_string);
118 var integer vl_delimsize:=lengthof(pl_delimiter);
120 if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1}
125 //=========================================================================
127 //=========================================================================
128 //pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference
129 function f_compareFiles(in charstring pl_file1, in charstring pl_file2, in integer pl_diffLimit) runs on xmlTest_CT {
130 var integer vl_expectedResult:=0
131 if(pl_diffLimit>0) { vl_expectedResult:=256; }
132 var boolean vl_success:=false;
133 f_shell_command("diff -w " & pl_file1 & " " & pl_file2,"",vl_expectedResult,vl_success);
135 if(v_ASP_PResult.code==0)
139 else if(v_ASP_PResult.code==256) {
140 var integer vl_counter:=0;
141 f_countDelimiters(v_ASP_PResult.stdout,"\n",vl_counter);
142 log("Counted lines: ",vl_counter, " diffLimit: ", pl_diffLimit)
143 if(vl_counter>pl_diffLimit) {
146 } else { //e.g 512: No such file or directory
147 log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult)
153 //=========================================================================
155 //=========================================================================
156 testcase tc_versionTest() runs on xmlTest_CT
158 f_shellCommandWithVerdict("compiler -v","",0)
161 testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
163 f_shellCommandWithVerdict("xsd2ttcn -v","",0)
167 testcase tc_firstTrial() runs on xmlTest_CT
169 f_shellCommandWithVerdict("xsd2ttcn elements.xsd","",c_shell_successWithoutWarningAndError);
171 if(getverdict==pass) {
173 "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff_headerAndModuleName);
177 // see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema
178 // This tc is "passed" but it is generated into noTargetNaespace.ttcn
179 testcase tc_secondTrial() runs on xmlTest_CT
181 f_shellCommandWithVerdict("xsd2ttcn po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);
183 if(getverdict==pass) {
185 "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff_headerAndModuleName);
188 testcase tc_empty() runs on xmlTest_CT
190 f_shellCommandWithVerdict("xsd2ttcn empty.xsd","",c_shell_successWithoutWarningAndError);
192 if(getverdict==pass) {
194 "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName);
198 testcase tc_annotation() runs on xmlTest_CT
200 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation.xsd","",c_shell_successWithWarning);
201 if(getverdict==pass) {
203 "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
207 testcase tc_annotation1() runs on xmlTest_CT
209 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
210 //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
213 testcase tc_annotation2() runs on xmlTest_CT
215 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation2.xsd","",c_shell_error);
216 //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
219 testcase tc_xml_in_annotation() runs on xmlTest_CT
221 f_shellCommandWithVerdict("xsd2ttcn xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
222 if(getverdict==pass) {
224 "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
228 //Incorrect version: 1.1, libxml parser prints warning
229 testcase tc_version() runs on xmlTest_CT
231 f_shellCommandWithVerdict("xsd2ttcn XmlTest_version.xsd","",c_shell_successWithWarning);
234 //************************************
235 // === Converter switch tests: ===
236 //************************************
237 // usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ...
241 // -c: disable the generation of comments in TTCN-3 modules
242 // -e: disable the generation of encoding instructions in TTCN-3 modules
243 // -f file: the XSD files are taken from file instead of the command line
244 // -p: do not generate the UsefulTtcn3Types and XSD predefined modules
245 // -q: quiet - disable the issue of status messages
246 // -s: parse and validate only - no TTCN-3 module generation
247 // -t: disable the generation of timing information in TTCN-3 modules
248 // -v: show version information
249 // -w: suppress warnings
250 // -x: disable schema validation but generate TTCN-3 modules
253 testcase tc_options_c() runs on xmlTest_CT
255 f_shellCommandWithVerdict("xsd2ttcn -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
256 if(getverdict==pass) {
257 f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
261 // -e: disable the generation of encoding instructions in TTCN-3 modules
262 testcase tc_options_e() runs on xmlTest_CT
264 f_shellCommandWithVerdict("xsd2ttcn -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
265 if(getverdict==pass) {
266 f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
270 // -f file: the XSD files are taken from file instead of the command line
271 testcase tc_options_f() runs on xmlTest_CT
273 f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithWarning );
274 if(getverdict==pass) {
275 f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
279 testcase tc_options_g() runs on xmlTest_CT
281 f_shellCommandWithVerdict("xsd2ttcn -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
282 if(getverdict==pass) {
283 f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
284 "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
287 f_shellCommandWithVerdict("xsd2ttcn generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
288 if(getverdict==pass) {
289 f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
290 "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
294 //-p: do not generate the UsefulTtcn3Types and XSD predefined modules
295 testcase tc_options_p() runs on xmlTest_CT
297 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
298 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
299 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
301 f_shellCommandWithVerdict("xsd2ttcn -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
302 if(getverdict==pass) {
303 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError);
304 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
305 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
308 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
309 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
310 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
313 //-s: parse and validate only - no TTCN-3 module generation
314 testcase tc_options_s() runs on xmlTest_CT
316 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
317 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
318 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
320 f_shellCommandWithVerdict("xsd2ttcn -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
321 //TODO:test if wrong xsd causes conversion error wit this switch
323 //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist:
324 if(getverdict==pass) {
325 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory );
326 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
327 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
329 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
330 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
331 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
335 // -t: disable the generation of timing information in TTCN-3 modules
336 testcase tc_options_t() runs on xmlTest_CT
338 f_shellCommandWithVerdict("xsd2ttcn -t XmlTest_annotation.xsd","",c_shell_successWithWarning );
339 if(getverdict==pass) {
340 f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerAndModuleName);
344 // -v: show version information
346 testcase tc_options_v() runs on xmlTest_CT
348 f_shellCommandWithVerdict("xsd2ttcn -v","",c_shell_successWithoutWarningAndError );
352 // -q: quiet - disable the issue of status messages
353 testcase tc_options_V() runs on xmlTest_CT
355 f_shellCommandWithVerdict("xsd2ttcn -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
358 // -w: suppress warnings
359 testcase tc_options_w() runs on xmlTest_CT
361 f_shellCommandWithVerdict("xsd2ttcn -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
365 // -x: disable schema validation but generate TTCN-3 modules
366 testcase tc_options_x() runs on xmlTest_CT
368 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
371 testcase tc_options_wrong() runs on xmlTest_CT
373 f_shellCommandWithVerdict("xsd2ttcn -H XmlTest_annotation.xsd","", c_shell_error);
376 testcase tc_options_missing() runs on xmlTest_CT
378 f_shellCommandWithVerdict("xsd2ttcn ","",c_shell_successWithoutWarningAndError );
379 //TODO: check the output
383 testcase tc_XmlTest_label() runs on xmlTest_CT
385 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
388 testcase tc_XmlTest_definition() runs on xmlTest_CT
390 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
392 //************************************
393 // Testcases_basedOnTtcnStandard9
394 //************************************
395 group Testcases_basedOnTtcnStandard9 {
398 testcase tc_XmlTest_all() runs on xmlTest_CT
400 f_shellCommandWithVerdict("xsd2ttcn all.xsd","",c_shell_successWithoutWarningAndError);
401 if(getverdict==pass) {
403 "www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName);
407 testcase tc_element_in_all_neg() runs on xmlTest_CT
409 f_shellCommandWithVerdict("xsd2ttcn element_in_all_minmax.xsd","",c_shell_error);
413 testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
415 f_shellCommandWithVerdict("xsd2ttcn any_anyAttribute.xsd","",c_shell_successWithWarning);
417 if(getverdict==pass) {
419 "http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
424 //Heading: XSD anyAtribute is inserted into a wrong place
426 testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
428 f_shellCommandWithVerdict("xsd2ttcn HQ73011.xsd","",c_shell_successWithoutWarningAndError);
429 if(getverdict==pass) {
431 "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName);
435 testcase tc_anyattribute_optional() runs on xmlTest_CT
437 f_shellCommandWithVerdict("xsd2ttcn anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
438 if(getverdict==pass) {
440 "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
444 testcase tc_anyattribute_single() runs on xmlTest_CT
446 f_shellCommandWithVerdict("xsd2ttcn anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
447 if(getverdict==pass) {
449 "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName);
453 testcase tc_anyattribute_in_complex() runs on xmlTest_CT
455 f_shellCommandWithVerdict("xsd2ttcn anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
456 if(getverdict==pass) {
458 "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace);
464 testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
466 f_shellCommandWithVerdict("xsd2ttcn attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
468 if(getverdict==pass) {
470 "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
474 //double schema definition - Validator Returns with Error, Passed
475 testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
477 f_shellCommandWithVerdict("xsd2ttcn attribute_use_noTNS.xsd","",c_shell_error);
480 testcase tc_id_attribute() runs on xmlTest_CT
482 f_shellCommandWithVerdict("xsd2ttcn id_attrib.xsd","",c_shell_successWithWarning);
483 if(getverdict==pass) {
485 "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName);
489 testcase tc_attribute_order() runs on xmlTest_CT
491 f_shellCommandWithVerdict("xsd2ttcn attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
492 if(getverdict==pass) {
494 "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName);
497 if(getverdict==pass) {
499 "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName);
503 testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
505 f_shellCommandWithVerdict("xsd2ttcn name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
506 if(getverdict==pass) {
508 "http_www_example_org_name_conv2_e.ttcn",
509 "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName);
513 testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
514 f_shellCommandWithVerdict("xsd2ttcn imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
516 if(getverdict==pass) {
518 "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName);
521 if(getverdict==pass) {
523 "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName);
527 testcase tc_module_typename_conversion() runs on xmlTest_CT {
528 f_shellCommandWithVerdict("xsd2ttcn module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
530 if(getverdict==pass) {
532 "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName);
535 if(getverdict==pass) {
537 "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName);
541 testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
543 f_shellCommandWithVerdict("xsd2ttcn name_conv_remove_seq_of_low_line.xsd","",
544 c_shell_successWithoutWarningAndError);
545 if(getverdict==pass) {
547 "http_www_example_org_name_conv3_e.ttcn",
548 "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName);
552 testcase tc_name_conv_with_z() runs on xmlTest_CT
554 f_shellCommandWithVerdict("xsd2ttcn -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
555 if(getverdict==pass) {
557 "www_example_org_name_conv_http_e.ttcn",
558 "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName);
562 testcase tc_comment_placement() runs on xmlTest_CT
564 f_shellCommandWithVerdict("xsd2ttcn comment_placement.xsd","",c_shell_successWithoutWarningAndError);
565 if(getverdict==pass) {
567 "www_example_org_comment_placement_e.ttcn",
568 "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName);
574 //************************************
575 // Testcases based on W3C standards
576 //************************************
578 //******************************
580 //******************************
583 //=== Correct string type definitions: ====
584 //TR HL21086 - whitespace preserve. TODO: standalone testcase
585 testcase tc_string() runs on xmlTest_CT
587 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
588 if(getverdict==pass) {
590 "www_XmlTest_org_string.ttcn",
591 "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace);
593 ////////////////////////////////////////////
595 // f_encDecTest_NameA();
596 // f_encDecTest_NameB();
597 // f_encDecTest_Non_empty_string();
598 // f_encDecTest_Type();
600 ////////////////////////////////////////////
603 //Passed, TR: Hl21086 - Solved
604 testcase tc_string_withWhitespace() runs on xmlTest_CT
606 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
607 if(getverdict==pass) {
609 "www_XmlTest_org_string_withWhitespace.ttcn",
610 "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName);
612 f_encDecTest_StringWhiteSpaceP();
613 f_encDecTest_StringWhiteSpaceR();
614 f_encDecTest_StringWhiteSpaceC();
617 //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!!
618 testcase tc_string_withEnum() runs on xmlTest_CT
620 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
621 if(getverdict==pass) {
623 "www_XmlTest_org_string_withEnum.ttcn",
624 "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName);
626 f_encDecTest_StringEnum();
628 //TODO: Write length of child restriction tests based on tc_string!!!
630 //=== Length restriction tests ===
634 //=== Faulty String definitions: =========
637 //TR: HL21257 --Solved
638 testcase tc_string_withPosLength() runs on xmlTest_CT
640 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
641 if(getverdict==pass) {
643 "www_XmlTest_org_string_withPosLength.ttcn",
644 "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName);
648 //Passed, returs with error
649 testcase tc_string_withEmptyLength() runs on xmlTest_CT
651 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyLength.xsd","",c_shell_error)
654 testcase tc_string_withNegativeLength() runs on xmlTest_CT
656 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeLength.xsd","",c_shell_error)
660 testcase tc_string_withFixedLength() runs on xmlTest_CT
662 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFixedLength.xsd","",c_shell_error);
665 testcase tc_fixed_value() runs on xmlTest_CT
667 f_shellCommandWithVerdict("xsd2ttcn fixed_value.xsd","",c_shell_successWithWarning);
668 if(getverdict==pass) {
670 "www_example_org_fixed_value.ttcn",
671 "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName);
676 testcase tc_string_withFloatLength() runs on xmlTest_CT
678 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFloatLength.xsd","", c_shell_error)
682 //Passed, TR: HL21690
683 testcase tc_string_withPosMinLength() runs on xmlTest_CT
685 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
686 if(getverdict==pass) {
688 "www_XmlTest_org_string_withMinLength.ttcn",
689 "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName);
694 testcase tc_string_withEmptyMin() runs on xmlTest_CT
696 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMin.xsd","",c_shell_error)
700 testcase tc_string_withNegativeMin() runs on xmlTest_CT
702 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMin.xsd","",c_shell_error)
707 testcase tc_string_withPosMax() runs on xmlTest_CT
709 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
710 if(getverdict==pass) {
712 "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName);
717 testcase tc_string_withEmptyMax() runs on xmlTest_CT
719 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMax.xsd","",c_shell_error)
723 testcase tc_string_withNegativeMax() runs on xmlTest_CT
725 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMax.xsd","",c_shell_error)
727 //=== minLength>maxLength
729 testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
731 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
734 testcase tc_string_withOverDefinition() runs on xmlTest_CT
736 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withOverDefinition.xsd","",c_shell_error)
739 testcase tc_string_withTypeAndBase() runs on xmlTest_CT
741 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
744 //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
746 // f_shellCommandWithVerdict("xsd2ttcn regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
747 // if(getverdict==pass) {
749 // "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName);
754 //******************************
756 //******************************
759 //TODO: check warning sending for not supported:features
760 testcase tc_boolean() runs on xmlTest_CT {
761 f_shellCommandWithVerdict("xsd2ttcn XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
762 if(getverdict==pass) {
764 "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName);
768 testcase tc_boolean_variant_commented() runs on xmlTest_CT {
769 f_shellCommandWithVerdict("xsd2ttcn boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
770 if(getverdict==pass) {
772 "www_example_org_boolean_variant_commented_e.ttcn",
773 "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName);
779 //******************************
781 //******************************
785 testcase tc_decimal() runs on xmlTest_CT {
786 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
787 if(getverdict==pass) {
789 "www_XmlTest_org_decimal_e.ttcn",
790 "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName);
794 //!!!!!Length not supported!!!!
795 // testcase tc_decimal_withLength() runs on xmlTest_CT {
796 // f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
797 // if(getverdict==pass) {
799 // "www_XmlTest_org_decimal_withLength_e.ttcn",
800 // "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName);
804 //TR: Generates integer limits instead of decimal
806 testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
807 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
809 if(getverdict==pass) {
811 "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
812 "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName);
817 testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
818 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
820 if(getverdict==pass) {
822 "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
823 "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName);
828 testcase tc_decimal_withEnum() runs on xmlTest_CT {
829 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
831 if(getverdict==pass) {
833 "www_XmlTest_org_decimal_withEnum_e.ttcn",
834 "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
838 testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
839 f_shellCommandWithVerdict("xsd2ttcn decimal_fractiondigits.xsd","",c_shell_successWithWarning)
841 if(getverdict==pass) {
843 "www_example_org_decimal_fractiondigits_e.ttcn",
844 "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName);
849 //******************************
851 // Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1
852 //******************************
855 testcase tc_integer() runs on xmlTest_CT {
856 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
858 if(getverdict==pass) {
860 "www_XmlTest_org_integer_e.ttcn",
861 "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName);
867 testcase tc_integer_empty1() runs on xmlTest_CT {
868 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_empty1.xsd","",c_shell_error)
872 testcase tc_integer_withLength() runs on xmlTest_CT {
873 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withLength.xsd","",c_shell_error)
876 //Ready, passed, TR:HL21694 -solved
877 testcase tc_integer_withEnum() runs on xmlTest_CT {
878 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
880 if(getverdict==pass) {
882 "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
887 testcase tc_integer_withMinIncl() runs on xmlTest_CT {
888 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
890 if(getverdict==pass) {
892 "www_XmlTest_org_integer_withMinIncl_e.ttcn",
893 "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName);
898 testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
899 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
901 if(getverdict==pass) {
903 "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName);
908 testcase tc_integer_withMinExcl() runs on xmlTest_CT {
909 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
911 if(getverdict==pass) {
913 "www_XmlTest_org_integer_withMinExcl_e.ttcn",
914 "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName);
919 testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
920 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
922 if(getverdict==pass) {
924 "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName);
932 testcase tc_float_not_a_number() runs on xmlTest_CT {
933 f_shellCommandWithVerdict("xsd2ttcn not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
935 if(getverdict==pass) {
937 "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
938 "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName);
943 testcase tc_simpleType_enum() runs on xmlTest_CT {
945 f_shellCommandWithVerdict("xsd2ttcn XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
947 if(getverdict==pass) {
949 "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName);
954 testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {
956 f_shellCommandWithVerdict("xsd2ttcn simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
958 if(getverdict==pass) {
960 "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName);
965 testcase tc_simpleType_ref() runs on xmlTest_CT {
967 f_shellCommandWithVerdict("xsd2ttcn simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
969 if(getverdict==pass) {
971 "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName);
976 testcase tc_simpleType_base() runs on xmlTest_CT {
978 f_shellCommandWithVerdict("xsd2ttcn simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
980 if(getverdict==pass) {
982 "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName);
988 testcase tc_enum_field_names() runs on xmlTest_CT {
990 f_shellCommandWithVerdict("xsd2ttcn enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
992 if(getverdict==pass) {
994 "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName);
999 testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {
1001 f_shellCommandWithVerdict("xsd2ttcn attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
1003 if(getverdict==pass) {
1005 "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff_headerAndModuleName);
1010 //******************************
1012 // Based on (XSD_2)/
1013 //******************************
1017 testcase tc_time() runs on xmlTest_CT {
1018 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
1020 if(getverdict==pass) {
1022 "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName);
1027 testcase tc_time_withEnum() runs on xmlTest_CT {
1028 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
1030 if(getverdict==pass) {
1032 "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
1039 testcase tc_list_conv() runs on xmlTest_CT {
1041 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
1043 if(getverdict==pass) {
1045 "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName);
1048 // restrictions:length, minLength, maxLength, pattern, and enumeration.
1051 testcase tc_list_encDec() runs on xmlTest_CT {
1052 f_encDecTest_StringList();
1055 testcase tc_integerList() runs on xmlTest_CT {
1057 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
1059 if(getverdict==pass) {
1061 "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName);
1066 testcase tc_list_simpletype() runs on xmlTest_CT {
1068 f_shellCommandWithVerdict("xsd2ttcn list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
1070 if(getverdict==pass) {
1072 "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName);
1080 testcase tc_union() runs on xmlTest_CT {
1082 f_shellCommandWithVerdict("xsd2ttcn XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
1084 if(getverdict==pass) {
1086 "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
1090 testcase tc_union_optional() runs on xmlTest_CT {
1092 f_shellCommandWithVerdict("xsd2ttcn ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
1094 if(getverdict==pass) {
1096 "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
1100 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {
1102 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction.xsd","",c_shell_successWithWarning)
1104 if(getverdict==pass) {
1106 "www_example_org_enumeration_restriction_e.ttcn",
1107 "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1111 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {
1113 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
1115 if(getverdict==pass) {
1117 "www_example_org_seq_enumeration_restriction_e.ttcn",
1118 "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1122 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {
1124 f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
1126 if(getverdict==pass) {
1128 "www_example_org_enumeration_remove_dup_e.ttcn",
1129 "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
1139 testcase tc_complex1() runs on xmlTest_CT {
1141 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
1143 if(getverdict==pass) {
1145 "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
1146 f_encDecTest_InternationalPrice();
1150 //TR: HL24977 -Solved
1151 testcase tc_complex2() runs on xmlTest_CT {
1153 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
1155 if(getverdict==pass) {
1157 "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
1159 f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
1160 f_encDecTest_InternationalPrice3();
1161 f_encDecTest_InternationalPrice4();
1164 testcase tc_complex_simpleContent() runs on xmlTest_CT {
1166 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
1168 if(getverdict==pass) {
1170 "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
1171 f_encDecTest_ComplexTypeWithSimpleContent1();
1172 f_encDecTest_ComplexTypeWithSimpleContent2();
1173 f_encDecTest_ComplexTypeWithSimpleContent2_neg();
1177 testcase tc_complex_namespaceas() runs on xmlTest_CT {
1179 f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
1181 if(getverdict==pass) {
1183 "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
1185 "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
1189 testcase tc_complex_mixed_conv() runs on xmlTest_CT {
1191 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
1193 if(getverdict==pass) {
1195 "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
1199 testcase tc_complex_group_reference() runs on xmlTest_CT {
1201 f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
1203 if(getverdict==pass) {
1205 "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
1210 testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
1211 f_encDecTest_ComplexTypeWithMixed();
1214 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {
1216 f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
1218 if(getverdict==pass) {
1220 "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
1221 f_encDecTest_InternationalPrice();
1225 testcase tc_complex_choice_converter() runs on xmlTest_CT {
1227 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
1229 if(getverdict==pass) {
1231 "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
1236 testcase tc_complex_choice_encDec() runs on xmlTest_CT {
1237 f_encDecTest_ComplexTypeWithChoice_1();
1238 f_encDecTest_ComplexTypeWithChoice_2();
1239 f_encDecTest_ComplexTypeWithChoice_3();
1240 f_encDecTest_ComplexTypeWithChoice_4();
1241 f_encDecTest_ComplexTypeWithChoice_5();
1242 f_encDecTest_ComplexTypeWithChoice_6();
1243 f_encDecTest_ComplexTypeWithChoice_7();
1244 f_encDecTest_ComplexTypeWithChoice_8();
1245 f_encDecTest_ComplexTypeWithChoice_9();
1246 f_encDecTest_ComplexTypeWithChoice_10();
1249 //Passed, TR: HL30830 -solved
1250 testcase tc_complex_all_converter() runs on xmlTest_CT {
1251 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
1253 if(getverdict==pass) {
1255 "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
1260 testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
1261 var MySubjects1 vl_pdu:= {
1269 var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
1270 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1273 testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
1274 var MySubjects1 vl_pdu:= {
1275 order:={math,english,chemistry, physics},
1277 english:="Advanced Group 1",
1278 math:="Beginners 1",
1279 physics:="Mechanics 1",
1282 var charstring vl_expectedEncodedPdu:=
1283 "<MySubjects1 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects1>\n\n"
1284 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1287 testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
1288 var MySubjects1 vl_pdu:= {
1289 order:={math,english,chemistry},
1291 english:="Advanced Group 1",
1292 math:="Beginners 1",
1297 order:={math,english},
1299 english:="Advanced Group 1",
1300 math:="Beginners 1",
1304 var charstring vl_expectedEncodedPdu:=
1305 "<MySubjects1 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n</MySubjects1>\n\n"
1306 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1309 testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
1310 f_encDecTest_ComplexTypeWithAll_inconsistentSet();
1313 //positive testcase for group "all". The type has no optional field (element).The input is correct
1314 testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
1315 var MySubjects2 vl_pdu:= {
1316 order:={math,english,chemistry, physics,history},
1318 english:="Advanced Group 1",
1319 math:="Beginners 1",
1320 physics:="Mechanics 1",
1324 var charstring vl_expectedEncodedPdu:=
1325 "<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n\t<History>H1</History>\n</MySubjects2>\n\n";
1326 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
1329 //Negative testcase for group "all". The type has no optional field (element).
1330 //The input is not correct: value of one field (history) is missing
1331 //Passed, TR: HL32978
1332 testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
1333 var MySubjects2 vl_pdu:= {
1334 order:={math,english,chemistry, physics,history},
1336 english:="Advanced Group 1",
1337 math:="Beginners 1",
1338 physics:="Mechanics 1",
1342 var MySubjects2 vl_expectedDecodedPdu:= {
1343 order:={math,english,chemistry, physics,history},
1345 english:="Advanced Group 1",
1346 math:="Beginners 1",
1347 physics:="Mechanics 1",
1351 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n\t<History/>\n</MySubjects2>\n\n"
1352 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
1355 //Negative testcase for group "all". The type has no optional field (element).
1356 //The input is not correct: value of one field (history) and its place in order-list is missing.
1357 // ***Less elements of record of order than required***
1358 //expectation: error report at encoding, returning 1 at decoding
1359 //Passed, TR: HL32978
1360 testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
1361 var MySubjects2 vl_pdu:= {
1362 order:={math,english,chemistry, physics},
1364 english:="Advanced Group 1",
1365 math:="Beginners 1",
1366 physics:="Mechanics 1",
1370 var MySubjects2 vl_expectedDecodedPdu:= {
1371 order:={math,english,chemistry, physics},
1373 english:="Advanced Group 1",
1374 math:="Beginners 1",
1375 physics:="Mechanics 1",
1379 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1380 //"<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects2>\n\n"
1381 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
1384 //Negative testcase for group "all". The type has no optional field (element).
1385 //The input is not correct: order three times contains "math", Physics and history are missing.
1386 //expectation: error report at encoding, returning 1 at decoding
1387 //Passed, TR: HL32978
1388 testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
1389 var MySubjects2 vl_pdu:= {
1390 order:={math,english,chemistry,math,math},
1392 english:="Advanced Group 1",
1393 math:="Beginners 1",
1394 physics:="Mechanics 1",
1398 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1399 //"<MySubjects2 Year='2009'>\n\t<Math>Beginners 1</Math>\n\t<English>Advanced Group 1</English>\n\t<Chemistry>CH2</Chemistry>\n\t<Physics>Mechanics 1</Physics>\n</MySubjects2>\n\n"
1400 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1404 //=========================================================================
1405 // tc_complex_all_noOptional_empty_encDec
1406 //=========================================================================
1407 //Negative testcase for group "all". The type has no optional field (element).
1408 //The input is not correct: value of all the fields and their place in order-list is missing
1409 //expectation: error report at encoding
1410 //Passed, TR: HL32978
1411 testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
1412 var MySubjects2 vl_pdu:= {
1415 //english:="Advanced Group 1",
1416 //math:="Beginners 1",
1417 //physics:="Mechanics 1",
1421 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1422 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1425 //=========================================================================
1426 // tc_complex_minOccursMaxOccurs
1427 //=========================================================================
1428 //Old name: tc_XmlTest_minOccursMaxOccurs
1429 ////TR (ethgry): HL10386
1430 testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
1432 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
1433 if(getverdict==pass) {
1435 "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
1440 testcase tc_complex_extension_converter() runs on xmlTest_CT {
1441 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
1443 if(getverdict==pass) {
1445 "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
1449 testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1450 f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
1452 if(getverdict==pass) {
1454 "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1458 testcase tc_complex_long_extension() runs on xmlTest_CT {
1459 f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)
1461 if(getverdict==pass) {
1463 "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
1467 testcase tc_complex_self_recursion() runs on xmlTest_CT {
1468 f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
1470 if(getverdict==pass) {
1472 "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
1476 testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1477 f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
1479 if(getverdict==pass) {
1481 "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
1485 testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1486 f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
1488 if(getverdict==pass) {
1490 "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
1494 testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1495 f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
1497 if(getverdict==pass) {
1499 "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
1503 testcase tc_attrib_enum() runs on xmlTest_CT {
1504 f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
1506 if(getverdict==pass) {
1508 "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
1512 testcase tc_complex_extension_encDec() runs on xmlTest_CT
1514 var MySubjects3Extension vl_pdu:={
1521 arts:="Impressionism"
1523 var charstring vl_expectedEncodedPdu:=
1524 "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
1525 f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1528 testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1529 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
1531 if(getverdict==pass) {
1533 "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1537 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1538 f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
1540 if(getverdict==pass) {
1542 "http_www_example_org_complex_restriction_with_use_e.ttcn",
1543 "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
1547 testcase tc_complex_nillable() runs on xmlTest_CT {
1548 f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
1550 if(getverdict==pass) {
1552 "www_example_org_complex_nillable_e.ttcn",
1553 "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
1557 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
1558 testcase tc_nillable_fixed() runs on xmlTest_CT {
1559 f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
1561 if(getverdict==pass) {
1563 "www_example_org_nillable_fixed_e.ttcn",
1564 "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
1568 testcase tc_no_ns_connector() runs on xmlTest_CT {
1569 f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
1571 if(getverdict==pass) {
1573 "www_example_org_no_ns_connector_e.ttcn",
1574 "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
1578 testcase tc_complex_restriction_encDec() runs on xmlTest_CT
1580 var MySubjects4Restriction vl_pdu:={
1583 math:="Combinatorics 1"
1585 var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
1586 f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1588 //TR: HL32948, Solved
1589 testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
1590 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
1593 //TR: HL32948, Solved
1594 testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
1595 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
1599 testcase tc_complex_unique_converter() runs on xmlTest_CT {
1600 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
1601 if(getverdict==pass) {
1603 "www_XmlTest_org_complex_unique_e.ttcn",
1604 "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace);
1608 //Positive test: The including and the included schema are in the same namespace
1609 testcase tc_complex_include_converter() runs on xmlTest_CT {
1610 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1612 if(getverdict==pass) {
1614 "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
1618 //=========================================================================
1619 // tc_complex_include_without_namespace
1620 //=========================================================================
1621 //Positive test: The including schema includes a schema without a namespace
1622 testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
1623 f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);
1625 if(getverdict==pass) {
1627 "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName);
1631 //=========================================================================
1632 // tc_complex_include_neg1_converter
1633 //=========================================================================
1634 //Negative test: The including and the included schema are not in the same namespace
1635 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1636 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1639 //=========================================================================
1640 // tc_complex_import_pos1_converter
1641 //=========================================================================
1642 //Positive test: The including and the included schema are in different namespaces (import and include)
1643 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1644 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1646 if(getverdict==pass) {
1648 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1651 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1655 //=========================================================================
1656 // tc_complex_import_pos2_converter
1657 //=========================================================================
1658 //Pos test: Checks if the converter can choose the file having the correct namespace
1659 //The types are the same in the 2nd and the 3rd file but only the 3rd have the namespace having prefix in the first file
1660 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1661 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1663 if(getverdict==pass) {
1665 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1668 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1672 //=========================================================================
1673 // tc_complex_import_neg1_converter
1674 //=========================================================================
1675 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1676 //If the type checking is switched off the testcase fails.
1677 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1678 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1681 //=========================================================================
1682 // tc_complex_import_withSL_converter
1683 //=========================================================================
1684 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1685 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1686 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1688 if(getverdict==pass) {
1690 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1694 //=========================================================================
1695 // tc_complex_import_withSL_encDec
1696 //=========================================================================
1697 // TODO: fix HR88527
1698 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1699 var PurchaseReportImport pl_pdu:= {
1701 periodEnding :="1999-12-31",
1727 base:="Baby Monitor"
1732 var charstring pl_expectedEncodedPdu:="<imp:purchaseReportImport xmlns:imp='www.XmlTest.org/complex_import' xmlns:r='www.XmlTest.org/complex_include' period='P3M' periodEnding='1999-12-31'>\n\t<imp:regions>\n\t\t<r:zip code='95819'>\n\t\t\t<r:part number='872-AA' quantity='1'/>\n\t\t\t<r:part number='926-AA' quantity='2'/>\n\t\t</r:zip>\n\t</imp:regions>\n\t<imp:parts>\n\t\t<r:part number='872-AA'>Lawnmower</r:part>\n\t\t<r:part number='926-AA'>Baby Monitor</r:part>\n\t</imp:parts>\n</imp:purchaseReportImport>\n\n";
1733 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1734 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1737 //=========================================================================
1738 // tc_complex_import_nameCollision_converter
1739 //=========================================================================
1740 //imports the same type from different namespaces
1741 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1742 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1744 if(getverdict==pass) {
1746 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1748 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1750 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1754 //=========================================================================
1755 // tc_complex_import_nameCollision2_converter
1756 //=========================================================================
1757 //imports the same type from different namespaces
1758 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1759 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1762 //=========================================================================
1763 // tc_complex_any_pos_converter
1764 //=========================================================================
1765 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
1766 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
1768 if(getverdict==pass) {
1770 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1774 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1775 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1777 if(getverdict==pass) {
1779 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1784 //=========================================================================
1785 // tc_complex_any_pos1_encDec
1786 // Failed, TR: HL37887
1787 //=========================================================================
1788 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1790 var ElementContainingXhtml_1 vl_pdu := {
1791 firstField:="1st field",
1793 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1795 thirdField:="3rd field"
1797 var charstring vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n";
1798 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1801 //=========================================================================
1802 // tc_complex_any_pos2_encDec
1803 //=========================================================================
1804 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1806 var ElementContainingXhtml_2 vl_pdu := {
1808 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1811 var charstring vl_expectedEncodedPdu:=
1812 "<r1:ElementContainingXhtml_2 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n</r1:ElementContainingXhtml_2>\n\n";
1813 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1816 //=========================================================================
1817 // tc_complex_any_pos3_encDec
1818 // Failed, TR: HL37887
1819 //=========================================================================
1820 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1822 var ElementContainingXhtml_1 vl_pdu :=
1824 firstField := "1st field",
1826 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>",
1827 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1828 thirdField := "3rd field"
1831 var charstring vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>\n\t<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n";
1832 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1837 //=========================================================================
1839 //=========================================================================
1843 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1845 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1847 if(getverdict==pass) {
1849 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1853 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1855 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1857 if(getverdict==pass) {
1859 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1863 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1865 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1867 if(getverdict==pass) {
1869 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1873 //Passed TR: Hl29679
1874 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1875 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
1876 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
1877 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1881 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1882 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
1883 var charstring vl_expectedEncodedPdu:=
1884 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
1885 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1888 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1889 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1890 var charstring vl_expectedEncodedPdu:=
1891 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
1892 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1895 //Passed, TR: HL29711
1896 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1897 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1898 var charstring vl_expectedEncodedPdu:=
1899 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1900 var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1901 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1904 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1905 var Anything1 vl_pdu:= {
1906 embed_values := omit,
1907 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1908 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1909 var charstring vl_expectedEncodedPdu:=
1910 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1911 var Anything1 vl_expectedDecodedPdu:= {
1912 embed_values := omit,
1913 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1914 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1916 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1919 testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
1920 var Anything1 vl_pdu:= {
1921 embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
1922 attr :={"someattr=\"1\""},
1924 "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
1925 "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
1926 "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
1929 var charstring vl_expectedEncodedPdu:=
1930 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' someattr=\"1\">The ordered <ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a> has arrived <ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>Wait for further information.<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>Ok</ns31:anything1>\n";
1931 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1934 //===============================================================
1935 // tc_element_anyType_deeper_encDec
1936 //===============================================================
1937 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1938 var Anything1 vl_pdu:= {
1939 embed_values := omit,
1940 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1941 elem_list:={"<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>", "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>"} };
1943 var charstring vl_expectedEncodedPdu:=
1944 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1><MyElement2><Level2>Goddag</Level2>\n</MyElement2></ns31:anything1>\n";
1945 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1949 type record of charstring charstringList;
1951 //===============================================================
1952 // tc_element_anyType_longer_encDec
1953 //===============================================================
1954 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1955 var charstringList vl_elementList:= {
1956 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1957 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1958 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1959 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1961 var Anything1 vl_pdu:= {
1962 embed_values := omit,
1965 "nationality=\"HU\""
1970 var charstring vl_expectedEncodedPdu:=
1971 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
1973 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1974 vl_pdu.elem_list[i]:=vl_elementList[i];
1975 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
1977 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
1979 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1983 //===============================================================
1984 // tc_element_recOfElements_converter
1985 //===============================================================
1986 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
1987 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
1989 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1991 if(getverdict==pass) {
1993 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1997 //Passed, old name: tc_element_recOfElements
1998 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
1999 f_encDecTest_PersonInfo1();
2000 f_encDecTest_PersonInfo2();
2001 f_encDecTest_PersonInfo2_omitOptionals();
2005 //Passed, TR HL27452
2006 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
2007 f_encDecTest_PersonInfo2_defaultAttribute();
2011 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
2013 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2015 if(getverdict==pass) {
2017 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2018 f_encDecTest_PersonInfo1_defaultElement();
2023 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
2025 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
2027 if(getverdict==pass) {
2029 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
2030 f_encDecTest_PersonInfo4();
2034 //Passed, TR:HL28010
2035 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
2037 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
2039 if(getverdict==pass) {
2041 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
2046 //Passed, TR: HL28024
2047 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
2049 f_encDecTest_PersonInfo3();
2052 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
2054 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
2056 if(getverdict==pass) {
2058 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
2063 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
2064 f_encDecTest_PersonInfo5();
2068 testcase tc_substitutiongroup() runs on xmlTest_CT {
2070 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2072 if(getverdict==pass) {
2074 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2079 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2081 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2083 if(getverdict==pass) {
2085 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2090 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2092 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
2094 if(getverdict==pass) {
2096 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2097 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2102 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2104 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
2106 if(getverdict==pass) {
2108 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2109 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2114 testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {
2116 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2118 if(getverdict==pass) {
2120 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2121 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2126 testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {
2128 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2130 if(getverdict==pass) {
2132 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2133 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2138 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2140 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2142 if(getverdict==pass) {
2144 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2145 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2150 //Test if we find the substitutiongroup references in notargetnamespace
2151 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2153 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2158 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2160 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2164 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2166 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
2168 if(getverdict==pass) {
2170 "www_example_org_substitutiongroup_ref_e.ttcn",
2171 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2174 if(getverdict==pass) {
2176 "www_example_org_substitutiongroup_main_e.ttcn",
2177 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2182 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2184 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2186 if(getverdict==pass) {
2188 "www_example_org_substitutiongroup_rename_e.ttcn",
2189 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2194 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2196 f_encDecTest_ize_subs();
2199 testcase tc_type_substitution() runs on xmlTest_CT {
2201 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2203 if(getverdict==pass) {
2205 "www_example_org_type_substitution_e.ttcn",
2206 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2211 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2213 f_encDecTest_type_subs();
2217 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2219 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2221 if(getverdict==pass) {
2223 "www_example_org_type_substitution_chain_e.ttcn",
2224 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2229 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2231 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2233 if(getverdict==pass) {
2235 "www_example_org_type_substitution_abstract_block_e.ttcn",
2236 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2241 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2243 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2245 if(getverdict==pass) {
2247 "www_example_org_type_substitution_mod1_e.ttcn",
2248 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2251 if(getverdict==pass) {
2253 "www_example_org_type_substitution_mod2_e.ttcn",
2254 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2259 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2261 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2263 if(getverdict==pass) {
2265 "www_example_org_type_substitution_simpletype_e.ttcn",
2266 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2271 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2273 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2275 if(getverdict==pass) {
2277 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2278 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2283 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2285 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2287 if(getverdict==pass) {
2289 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2290 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2293 if(getverdict==pass) {
2295 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2296 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2301 testcase tc_only_element_substitution() runs on xmlTest_CT {
2303 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2305 if(getverdict==pass) {
2307 "www_example_org_only_element_substitution_e.ttcn",
2308 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2313 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2315 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2317 if(getverdict==pass) {
2319 "www_example_org_type_substitution_builtintype_e.ttcn",
2320 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2325 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2327 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2329 if(getverdict==pass) {
2331 "www_example_org_type_substitution_rename_e.ttcn",
2332 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2337 testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {
2339 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)
2341 if(getverdict==pass) {
2343 "www_example_org_type_substitution_complex_cascade_e.ttcn",
2344 "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2349 testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {
2351 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)
2353 if(getverdict==pass) {
2355 "www_example_org_type_substitution_simple_cascade_e.ttcn",
2356 "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2363 //========================================================
2364 // tc_element_nameInheritance_conv
2365 // Checks if name of named (aliased) type is not inherited
2366 //========================================================
2367 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2368 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2371 //========================================
2372 // tc_element_nameInheritance_encDec
2373 // Checks if name of named (aliased) type is not inherited
2374 //========================================
2376 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2377 f_encDecTest_nameInheritance();
2380 //========================================
2381 // tc_element_Tgc_encDec
2382 // Checks if name of named (aliased) type is not inherited
2383 //========================================
2385 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2389 testcase tc_element_abstract_conv() runs on xmlTest_CT {
2390 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
2393 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2394 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2396 if(getverdict==pass) {
2398 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2402 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2403 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2405 if(getverdict==pass) {
2407 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2411 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2412 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2414 if(getverdict==pass) {
2416 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2417 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2421 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2422 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2424 if(getverdict==pass) {
2426 "www_example_org_type_attributegroup_nillable_e.ttcn",
2427 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2431 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2432 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2434 if(getverdict==pass) {
2436 "www_example_org_attribgroup_ingroup_e.ttcn",
2437 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2441 //IndividualTrigger, nile="false"
2442 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2443 f_encDecTest_IndividualTrigger1();
2446 //IndividualTrigger, nil="true"
2447 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2448 f_encDecTest_IndividualTrigger2(); //empty record
2452 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2453 f_encDecTest_Isp1();
2457 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2458 f_encDecTest_Isp2();
2461 //RemarkNillable, nil="false"
2462 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2463 f_encDecTest_RemarkNillable1();
2466 //RemarkNillable, nil="true"
2467 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2468 f_encDecTest_RemarkNillable2();
2473 //=========================================================================
2475 //=========================================================================
2478 execute(tc_versionTest());//Passed
2479 execute(tc_xsd2ttcn_versionTest());//Passed
2481 execute(tc_firstTrial());//Passed
2482 execute(tc_secondTrial());//Passed
2483 execute(tc_empty()); //Passed, TR:
2484 //appended to increase coverage:
2486 execute(tc_annotation());
2487 execute(tc_annotation1());
2488 execute(tc_annotation2());
2489 execute(tc_xml_in_annotation());
2491 execute(tc_version());
2492 execute(tc_options_c());
2493 execute(tc_options_e());
2494 execute(tc_options_f());
2495 execute(tc_options_g());
2496 execute(tc_options_p());
2497 execute(tc_options_s());
2498 execute(tc_options_t());
2499 execute(tc_options_v());
2500 execute(tc_options_V());
2501 execute(tc_options_w());
2502 execute(tc_options_x());
2503 execute(tc_options_wrong());
2504 execute(tc_options_missing());
2505 //===LABEL and DEFINITION - unknown but used tags
2507 //===ttcn standard===
2508 execute(tc_XmlTest_all());//Passed
2509 execute(tc_element_in_all_neg());
2510 execute(tc_XmlTest_any_anyAttribute());//Passed
2511 execute(tc_XmlTest_HQ73011());//Passed
2512 execute(tc_anyattribute_optional());
2513 execute(tc_anyattribute_single());
2514 execute(tc_anyattribute_in_complex());
2515 execute(tc_XmlTest_attributeGroup());//Passed
2516 execute(tc_XmlTest_attribute_use_noTNS());//Passed
2517 execute(tc_id_attribute());
2518 execute(tc_attribute_order());
2519 execute(tc_name_conv_non_alphanumeric());
2520 execute(tc_module_name_convert_with_diff_namespace());
2521 execute(tc_module_typename_conversion());
2522 execute(tc_name_conv_remove_seq_of_low_line());
2523 execute(tc_name_conv_with_z());
2524 execute(tc_comment_placement());
2526 //===W3C standard===
2529 execute(tc_string()); //passed
2530 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2531 execute(tc_string_withEnum());//Passed, TR: HL26227
2532 execute(tc_string_withPosLength());//TR: HL21257,
2533 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2534 execute(tc_string_withNegativeLength());//Passed
2535 execute(tc_string_withFixedLength()); //Passed
2536 execute(tc_fixed_value());
2537 execute(tc_string_withFloatLength()); //passed ???
2538 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2539 execute(tc_string_withEmptyMin());//Passed
2540 execute(tc_string_withNegativeMin());//Passed
2541 execute(tc_string_withPosMax())//Passed
2542 execute(tc_string_withEmptyMax());//Passed
2543 execute(tc_string_withNegativeMax());//Passed
2544 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2545 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2546 execute(tc_string_withTypeAndBase());//Passed
2547 //TODO: put this test back later
2548 //execute(tc_string_pattern_square_brackets());
2550 execute(tc_boolean());//Passed
2551 execute(tc_boolean_variant_commented());
2553 execute(tc_decimal());//Passed
2554 //execute(tc_decimal_withLength()); length not supported
2555 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2556 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2557 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
2558 execute(tc_decimal_fractiondigits());
2560 execute(tc_integer());//Passed
2561 execute(tc_integer_empty1());//Passed
2562 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2563 execute(tc_integer_withMinIncl());//Passed
2564 execute(tc_integer_withMaxIncl());//Passed
2565 execute(tc_integer_withMinExcl());//Passed
2566 execute(tc_integer_withMaxExcl());//Passed
2568 execute(tc_time());//passed
2569 execute(tc_time_withEnum());//Passed TR HL22058
2571 execute(tc_list_conv()); //Passed
2572 execute(tc_list_encDec());//Passed
2573 execute(tc_integerList());//Passed
2574 execute(tc_list_simpletype());//Passed
2576 execute(tc_float_not_a_number());
2578 //===simpleType enum====
2579 execute(tc_simpleType_enum());//Passed
2580 execute(tc_simpleType_restrict_comp());
2581 execute(tc_simpleType_ref());
2582 execute(tc_simpleType_base());
2583 execute(tc_enum_field_names());
2584 execute(tc_attribute_enumeration_variant());
2586 execute(tc_union());//TR:HL23577
2587 execute(tc_union_optional());//CR_TR18883
2588 execute(tc_enumeration_union_restriction());
2589 execute(tc_enumeration_union_restriction2());
2590 execute(tc_enumeration_remove_dup());
2592 execute(tc_complex1()); //Passed
2593 execute(tc_complex2());//TR: HL24977
2594 execute(tc_complex_simpleContent());
2595 execute(tc_complex_namespaceas());
2596 execute(tc_complex_mixed_conv()); //Passed
2597 execute(tc_complex_group_reference());
2598 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
2599 execute(tc_complex_seq_embeds_seq());
2600 execute(tc_complex_choice_converter());//Passed
2601 execute(tc_complex_choice_encDec());//Passed
2603 execute(tc_complex_all_converter());//Passed
2604 execute(tc_complex_all_emptySet_encDec());//Passed
2605 execute(tc_complex_all_fullSet_encDec());//Passed
2606 execute(tc_complex_all_subSet_encDec());//Passed
2607 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2608 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2609 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2610 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2611 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2612 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2613 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2614 execute(tc_complex_extension_converter()); //TR HL32505
2615 execute(tc_complex_extension_encDec()); //Passed
2616 execute(tc_complex_extension_name_attrib_convert());
2617 execute(tc_complex_long_extension());
2618 execute(tc_type_name_conversion_follow());
2619 execute(tc_complex_extension_with_attrib());
2620 execute(tc_extension_restriction_with_attrib());
2621 execute(tc_attrib_enum());
2622 execute(tc_complex_self_recursion());
2623 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
2624 execute(tc_complex_restriction_with_use());
2625 execute(tc_complex_nillable());
2626 execute(tc_nillable_fixed());
2627 execute(tc_no_ns_connector());
2631 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
2636 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2637 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2638 execute(tc_complex_unique_converter());
2639 execute(tc_complex_include_converter());
2640 execute(tc_complex_include_neg1_converter());
2641 execute(tc_complex_include_without_namespace());
2642 execute(tc_complex_import_pos1_converter());
2643 execute(tc_complex_import_pos2_converter());
2644 execute(tc_complex_import_neg1_converter());
2645 execute(tc_complex_import_withSL_converter());//SchemaLocation
2646 execute(tc_complex_import_withSL_encDec());
2647 execute(tc_complex_import_nameCollision_converter());
2648 execute(tc_complex_import_nameCollision2_converter());
2649 execute(tc_complex_any_pos_converter());
2650 execute(tc_imported_type_prefix());
2651 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2652 execute(tc_complex_any_pos2_encDec());
2653 execute(tc_complex_any_pos3_encDec());//failed, TR:
2655 execute(tc_element_anyType_converter());//Passed
2656 execute(tc_element_attrib_qualified());
2657 execute(tc_element_attrib_unqualified());
2658 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2659 execute(tc_element_anyType_attrOnly_encDec());//Passed
2660 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2661 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2662 execute(tc_element_anyType_encDec());//Passed, HL29711
2663 execute(tc_element_anyType_embed_encDec());
2664 execute(tc_element_anyType_deeper_encDec());
2665 execute(tc_element_anyType_longer_encDec());
2666 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2667 execute(tc_element_recOfElements_encDec());//Passed
2668 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2669 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2670 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2671 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2672 execute(tc_element_recOfElements_anonymousType_conv());
2673 execute(tc_element_recOfElements_anonymousType_encDec());
2676 //===substitutiongroup===
2677 execute(tc_substitutiongroup());
2678 execute(tc_substitutiongroup_name_as());
2679 execute(tc_substitutiongroup_abstract_block_rest());
2680 execute(tc_substitutiongroup_abstract_block_ext());
2681 execute(tc_substitutiongroup_complex_without_element());
2682 execute(tc_substitutiongroup_long_extension());
2683 execute(tc_substitutiongroup_complextype_block());
2684 execute(tc_substitutiongroup_notargetnamespace());
2685 execute(tc_substitutiongroup_neg());
2686 execute(tc_substitutiongroup_diff_module());
2687 execute(tc_substitutiongroup_rename());
2688 execute(tc_substitutiongroup_endDec());
2690 //===type substitution===
2691 execute(tc_type_substitution());
2692 execute(tc_type_substitution_encDec());
2693 execute(tc_type_substitution_chain());
2694 execute(tc_type_substitution_abstract_block());
2695 execute(tc_type_substitution_diff_module());
2696 execute(tc_type_substitution_simpletype());
2697 execute(tc_type_substitution_with_elem_substitution());
2698 execute(tc_type_substitution_element_in_ct());
2699 execute(tc_only_element_substitution());
2700 execute(tc_type_substitution_builtintype());
2701 execute(tc_type_substitution_rename());
2702 execute(tc_type_substitution_complex_cascade());
2703 execute(tc_type_substitution_simple_cascade());
2707 execute(tc_element_nameInheritance_conv());
2708 execute(tc_element_nameInheritance_encDec());//TR HL49978
2709 execute(tc_element_Tgc_encDec());//TR HL49978
2710 execute(tc_element_abstract_conv()); //Not supported features
2711 execute(tc_element_nillable_converter());
2712 execute(tc_element_nillable_with_annotations());
2713 execute(tc_element_nillable_in_nillable_extension());
2714 execute(tc_element_attributegroup_nillable());
2715 execute(tc_element_attributegroup_ingroup());
2716 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2717 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2718 execute(tc_element_nillable_Isp_nilFalse_encDec());
2719 execute(tc_element_nillable_Isp_nilTrue_encDec());
2720 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2721 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2725 extension "version R1A02"; // a prerelease version
2726 extension "requiresTITAN R1C01";