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);
1077 testcase tc_list_complextype() runs on xmlTest_CT {
1079 f_shellCommandWithVerdict("xsd2ttcn list_complextype.xsd","",c_shell_successWithoutWarningAndError)
1081 if(getverdict==pass) {
1083 "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff_headerAndModuleName);
1091 testcase tc_union() runs on xmlTest_CT {
1093 f_shellCommandWithVerdict("xsd2ttcn XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
1095 if(getverdict==pass) {
1097 "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
1101 testcase tc_union_optional() runs on xmlTest_CT {
1103 f_shellCommandWithVerdict("xsd2ttcn ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
1105 if(getverdict==pass) {
1107 "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
1111 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {
1113 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction.xsd","",c_shell_successWithWarning)
1115 if(getverdict==pass) {
1117 "www_example_org_enumeration_restriction_e.ttcn",
1118 "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1122 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {
1124 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
1126 if(getverdict==pass) {
1128 "www_example_org_seq_enumeration_restriction_e.ttcn",
1129 "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1133 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {
1135 f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
1137 if(getverdict==pass) {
1139 "www_example_org_enumeration_remove_dup_e.ttcn",
1140 "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
1150 testcase tc_complex1() runs on xmlTest_CT {
1152 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
1154 if(getverdict==pass) {
1156 "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
1157 f_encDecTest_InternationalPrice();
1161 //TR: HL24977 -Solved
1162 testcase tc_complex2() runs on xmlTest_CT {
1164 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
1166 if(getverdict==pass) {
1168 "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
1170 f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
1171 f_encDecTest_InternationalPrice3();
1172 f_encDecTest_InternationalPrice4();
1175 testcase tc_complex_simpleContent() runs on xmlTest_CT {
1177 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
1179 if(getverdict==pass) {
1181 "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
1182 f_encDecTest_ComplexTypeWithSimpleContent1();
1183 f_encDecTest_ComplexTypeWithSimpleContent2();
1184 f_encDecTest_ComplexTypeWithSimpleContent2_neg();
1188 testcase tc_complex_namespaceas() runs on xmlTest_CT {
1190 f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
1192 if(getverdict==pass) {
1194 "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
1196 "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
1200 testcase tc_complex_mixed_conv() runs on xmlTest_CT {
1202 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
1204 if(getverdict==pass) {
1206 "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
1210 testcase tc_complex_group_reference() runs on xmlTest_CT {
1212 f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
1214 if(getverdict==pass) {
1216 "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
1221 testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
1222 f_encDecTest_ComplexTypeWithMixed();
1225 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {
1227 f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
1229 if(getverdict==pass) {
1231 "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
1232 f_encDecTest_InternationalPrice();
1236 testcase tc_complex_choice_converter() runs on xmlTest_CT {
1238 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
1240 if(getverdict==pass) {
1242 "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
1247 testcase tc_complex_choice_encDec() runs on xmlTest_CT {
1248 f_encDecTest_ComplexTypeWithChoice_1();
1249 f_encDecTest_ComplexTypeWithChoice_2();
1250 f_encDecTest_ComplexTypeWithChoice_3();
1251 f_encDecTest_ComplexTypeWithChoice_4();
1252 f_encDecTest_ComplexTypeWithChoice_5();
1253 f_encDecTest_ComplexTypeWithChoice_6();
1254 f_encDecTest_ComplexTypeWithChoice_7();
1255 f_encDecTest_ComplexTypeWithChoice_8();
1256 f_encDecTest_ComplexTypeWithChoice_9();
1257 f_encDecTest_ComplexTypeWithChoice_10();
1260 //Passed, TR: HL30830 -solved
1261 testcase tc_complex_all_converter() runs on xmlTest_CT {
1262 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
1264 if(getverdict==pass) {
1266 "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
1271 testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
1272 var MySubjects1 vl_pdu:= {
1280 var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
1281 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1284 testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
1285 var MySubjects1 vl_pdu:= {
1286 order:={math,english,chemistry, physics},
1288 english:="Advanced Group 1",
1289 math:="Beginners 1",
1290 physics:="Mechanics 1",
1293 var charstring vl_expectedEncodedPdu:=
1294 "<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"
1295 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1298 testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
1299 var MySubjects1 vl_pdu:= {
1300 order:={math,english,chemistry},
1302 english:="Advanced Group 1",
1303 math:="Beginners 1",
1308 order:={math,english},
1310 english:="Advanced Group 1",
1311 math:="Beginners 1",
1315 var charstring vl_expectedEncodedPdu:=
1316 "<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"
1317 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1320 testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
1321 f_encDecTest_ComplexTypeWithAll_inconsistentSet();
1324 //positive testcase for group "all". The type has no optional field (element).The input is correct
1325 testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
1326 var MySubjects2 vl_pdu:= {
1327 order:={math,english,chemistry, physics,history},
1329 english:="Advanced Group 1",
1330 math:="Beginners 1",
1331 physics:="Mechanics 1",
1335 var charstring vl_expectedEncodedPdu:=
1336 "<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";
1337 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
1340 //Negative testcase for group "all". The type has no optional field (element).
1341 //The input is not correct: value of one field (history) is missing
1342 //Passed, TR: HL32978
1343 testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
1344 var MySubjects2 vl_pdu:= {
1345 order:={math,english,chemistry, physics,history},
1347 english:="Advanced Group 1",
1348 math:="Beginners 1",
1349 physics:="Mechanics 1",
1353 var MySubjects2 vl_expectedDecodedPdu:= {
1354 order:={math,english,chemistry, physics,history},
1356 english:="Advanced Group 1",
1357 math:="Beginners 1",
1358 physics:="Mechanics 1",
1362 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"
1363 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
1366 //Negative testcase for group "all". The type has no optional field (element).
1367 //The input is not correct: value of one field (history) and its place in order-list is missing.
1368 // ***Less elements of record of order than required***
1369 //expectation: error report at encoding, returning 1 at decoding
1370 //Passed, TR: HL32978
1371 testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
1372 var MySubjects2 vl_pdu:= {
1373 order:={math,english,chemistry, physics},
1375 english:="Advanced Group 1",
1376 math:="Beginners 1",
1377 physics:="Mechanics 1",
1381 var MySubjects2 vl_expectedDecodedPdu:= {
1382 order:={math,english,chemistry, physics},
1384 english:="Advanced Group 1",
1385 math:="Beginners 1",
1386 physics:="Mechanics 1",
1390 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1391 //"<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"
1392 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
1395 //Negative testcase for group "all". The type has no optional field (element).
1396 //The input is not correct: order three times contains "math", Physics and history are missing.
1397 //expectation: error report at encoding, returning 1 at decoding
1398 //Passed, TR: HL32978
1399 testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
1400 var MySubjects2 vl_pdu:= {
1401 order:={math,english,chemistry,math,math},
1403 english:="Advanced Group 1",
1404 math:="Beginners 1",
1405 physics:="Mechanics 1",
1409 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1410 //"<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"
1411 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1415 //=========================================================================
1416 // tc_complex_all_noOptional_empty_encDec
1417 //=========================================================================
1418 //Negative testcase for group "all". The type has no optional field (element).
1419 //The input is not correct: value of all the fields and their place in order-list is missing
1420 //expectation: error report at encoding
1421 //Passed, TR: HL32978
1422 testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
1423 var MySubjects2 vl_pdu:= {
1426 //english:="Advanced Group 1",
1427 //math:="Beginners 1",
1428 //physics:="Mechanics 1",
1432 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1433 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1436 //=========================================================================
1437 // tc_complex_minOccursMaxOccurs
1438 //=========================================================================
1439 //Old name: tc_XmlTest_minOccursMaxOccurs
1440 ////TR (ethgry): HL10386
1441 testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
1443 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
1444 if(getverdict==pass) {
1446 "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
1451 testcase tc_complex_extension_converter() runs on xmlTest_CT {
1452 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
1454 if(getverdict==pass) {
1456 "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
1460 testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1461 f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
1463 if(getverdict==pass) {
1465 "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1469 testcase tc_complex_long_extension() runs on xmlTest_CT {
1470 f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)
1472 if(getverdict==pass) {
1474 "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
1478 testcase tc_complex_self_recursion() runs on xmlTest_CT {
1479 f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
1481 if(getverdict==pass) {
1483 "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
1487 testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1488 f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
1490 if(getverdict==pass) {
1492 "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
1496 testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1497 f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
1499 if(getverdict==pass) {
1501 "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
1505 testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1506 f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
1508 if(getverdict==pass) {
1510 "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
1514 testcase tc_attrib_enum() runs on xmlTest_CT {
1515 f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
1517 if(getverdict==pass) {
1519 "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
1523 testcase tc_complex_extension_encDec() runs on xmlTest_CT
1525 var MySubjects3Extension vl_pdu:={
1532 arts:="Impressionism"
1534 var charstring vl_expectedEncodedPdu:=
1535 "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
1536 f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1539 testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1540 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
1542 if(getverdict==pass) {
1544 "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1548 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1549 f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
1551 if(getverdict==pass) {
1553 "http_www_example_org_complex_restriction_with_use_e.ttcn",
1554 "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
1558 testcase tc_complex_nillable() runs on xmlTest_CT {
1559 f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
1561 if(getverdict==pass) {
1563 "www_example_org_complex_nillable_e.ttcn",
1564 "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
1568 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
1569 testcase tc_nillable_fixed() runs on xmlTest_CT {
1570 f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
1572 if(getverdict==pass) {
1574 "www_example_org_nillable_fixed_e.ttcn",
1575 "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
1579 testcase tc_no_ns_connector() runs on xmlTest_CT {
1580 f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
1582 if(getverdict==pass) {
1584 "www_example_org_no_ns_connector_e.ttcn",
1585 "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
1589 testcase tc_complex_restriction_encDec() runs on xmlTest_CT
1591 var MySubjects4Restriction vl_pdu:={
1594 math:="Combinatorics 1"
1596 var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
1597 f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1599 //TR: HL32948, Solved
1600 testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
1601 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
1604 //TR: HL32948, Solved
1605 testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
1606 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
1610 testcase tc_complex_unique_converter() runs on xmlTest_CT {
1611 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
1612 if(getverdict==pass) {
1614 "www_XmlTest_org_complex_unique_e.ttcn",
1615 "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace);
1619 //Positive test: The including and the included schema are in the same namespace
1620 testcase tc_complex_include_converter() runs on xmlTest_CT {
1621 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1623 if(getverdict==pass) {
1625 "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
1629 //=========================================================================
1630 // tc_complex_include_without_namespace
1631 //=========================================================================
1632 //Positive test: The including schema includes a schema without a namespace
1633 testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
1634 f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);
1636 if(getverdict==pass) {
1638 "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName);
1642 //=========================================================================
1643 // tc_complex_include_neg1_converter
1644 //=========================================================================
1645 //Negative test: The including and the included schema are not in the same namespace
1646 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1647 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1650 //=========================================================================
1651 // tc_complex_import_pos1_converter
1652 //=========================================================================
1653 //Positive test: The including and the included schema are in different namespaces (import and include)
1654 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1655 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1657 if(getverdict==pass) {
1659 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1662 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1666 //=========================================================================
1667 // tc_complex_import_pos2_converter
1668 //=========================================================================
1669 //Pos test: Checks if the converter can choose the file having the correct namespace
1670 //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
1671 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1672 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1674 if(getverdict==pass) {
1676 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1679 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1683 //=========================================================================
1684 // tc_complex_import_neg1_converter
1685 //=========================================================================
1686 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1687 //If the type checking is switched off the testcase fails.
1688 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1689 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1692 //=========================================================================
1693 // tc_complex_import_withSL_converter
1694 //=========================================================================
1695 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1696 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1697 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1699 if(getverdict==pass) {
1701 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1705 //=========================================================================
1706 // tc_complex_import_withSL_encDec
1707 //=========================================================================
1708 // TODO: fix HR88527
1709 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1710 var PurchaseReportImport pl_pdu:= {
1712 periodEnding :="1999-12-31",
1738 base:="Baby Monitor"
1743 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";
1744 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1745 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1748 //=========================================================================
1749 // tc_complex_import_nameCollision_converter
1750 //=========================================================================
1751 //imports the same type from different namespaces
1752 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1753 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1755 if(getverdict==pass) {
1757 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1759 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1761 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1765 //=========================================================================
1766 // tc_complex_import_nameCollision2_converter
1767 //=========================================================================
1768 //imports the same type from different namespaces
1769 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1770 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1773 //=========================================================================
1774 // tc_complex_any_pos_converter
1775 //=========================================================================
1776 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
1777 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
1779 if(getverdict==pass) {
1781 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1785 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1786 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1788 if(getverdict==pass) {
1790 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1795 //=========================================================================
1796 // tc_complex_any_pos1_encDec
1797 // Failed, TR: HL37887
1798 //=========================================================================
1799 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1801 var ElementContainingXhtml_1 vl_pdu := {
1802 firstField:="1st field",
1804 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1806 thirdField:="3rd field"
1808 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";
1809 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1812 //=========================================================================
1813 // tc_complex_any_pos2_encDec
1814 //=========================================================================
1815 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1817 var ElementContainingXhtml_2 vl_pdu := {
1819 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1822 var charstring vl_expectedEncodedPdu:=
1823 "<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";
1824 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1827 //=========================================================================
1828 // tc_complex_any_pos3_encDec
1829 // Failed, TR: HL37887
1830 //=========================================================================
1831 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1833 var ElementContainingXhtml_1 vl_pdu :=
1835 firstField := "1st field",
1837 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>",
1838 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1839 thirdField := "3rd field"
1842 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";
1843 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1848 //=========================================================================
1850 //=========================================================================
1854 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1856 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1858 if(getverdict==pass) {
1860 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1864 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1866 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1868 if(getverdict==pass) {
1870 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1874 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1876 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1878 if(getverdict==pass) {
1880 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1884 //Passed TR: Hl29679
1885 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1886 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
1887 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
1888 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1892 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1893 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
1894 var charstring vl_expectedEncodedPdu:=
1895 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
1896 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1899 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1900 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1901 var charstring vl_expectedEncodedPdu:=
1902 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
1903 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1906 //Passed, TR: HL29711
1907 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1908 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1909 var charstring vl_expectedEncodedPdu:=
1910 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1911 var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1912 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1915 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1916 var Anything1 vl_pdu:= {
1917 embed_values := omit,
1918 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1919 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1920 var charstring vl_expectedEncodedPdu:=
1921 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1922 var Anything1 vl_expectedDecodedPdu:= {
1923 embed_values := omit,
1924 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1925 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1927 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1930 testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
1931 var Anything1 vl_pdu:= {
1932 embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
1933 attr :={"someattr=\"1\""},
1935 "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
1936 "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
1937 "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
1940 var charstring vl_expectedEncodedPdu:=
1941 "<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";
1942 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1945 //===============================================================
1946 // tc_element_anyType_deeper_encDec
1947 //===============================================================
1948 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1949 var Anything1 vl_pdu:= {
1950 embed_values := omit,
1951 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1952 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>"} };
1954 var charstring vl_expectedEncodedPdu:=
1955 "<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";
1956 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1960 type record of charstring charstringList;
1962 //===============================================================
1963 // tc_element_anyType_longer_encDec
1964 //===============================================================
1965 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1966 var charstringList vl_elementList:= {
1967 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1968 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1969 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1970 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1972 var Anything1 vl_pdu:= {
1973 embed_values := omit,
1976 "nationality=\"HU\""
1981 var charstring vl_expectedEncodedPdu:=
1982 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
1984 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1985 vl_pdu.elem_list[i]:=vl_elementList[i];
1986 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
1988 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
1990 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1994 //===============================================================
1995 // tc_element_recOfElements_converter
1996 //===============================================================
1997 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
1998 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
2000 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2002 if(getverdict==pass) {
2004 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2008 //Passed, old name: tc_element_recOfElements
2009 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
2010 f_encDecTest_PersonInfo1();
2011 f_encDecTest_PersonInfo2();
2012 f_encDecTest_PersonInfo2_omitOptionals();
2016 //Passed, TR HL27452
2017 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
2018 f_encDecTest_PersonInfo2_defaultAttribute();
2022 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
2024 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2026 if(getverdict==pass) {
2028 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2029 f_encDecTest_PersonInfo1_defaultElement();
2034 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
2036 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
2038 if(getverdict==pass) {
2040 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
2041 f_encDecTest_PersonInfo4();
2045 //Passed, TR:HL28010
2046 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
2048 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
2050 if(getverdict==pass) {
2052 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
2057 //Passed, TR: HL28024
2058 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
2060 f_encDecTest_PersonInfo3();
2063 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
2065 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
2067 if(getverdict==pass) {
2069 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
2074 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
2075 f_encDecTest_PersonInfo5();
2079 testcase tc_substitutiongroup() runs on xmlTest_CT {
2081 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2083 if(getverdict==pass) {
2085 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2090 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2092 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2094 if(getverdict==pass) {
2096 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2101 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2103 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
2105 if(getverdict==pass) {
2107 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2108 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2113 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2115 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
2117 if(getverdict==pass) {
2119 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2120 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2125 testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {
2127 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2129 if(getverdict==pass) {
2131 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2132 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2137 testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {
2139 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2141 if(getverdict==pass) {
2143 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2144 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2149 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2151 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2153 if(getverdict==pass) {
2155 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2156 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2161 //Test if we find the substitutiongroup references in notargetnamespace
2162 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2164 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2169 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2171 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2175 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2177 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
2179 if(getverdict==pass) {
2181 "www_example_org_substitutiongroup_ref_e.ttcn",
2182 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2185 if(getverdict==pass) {
2187 "www_example_org_substitutiongroup_main_e.ttcn",
2188 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2193 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2195 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2197 if(getverdict==pass) {
2199 "www_example_org_substitutiongroup_rename_e.ttcn",
2200 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2205 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2207 f_encDecTest_ize_subs();
2210 testcase tc_type_substitution() runs on xmlTest_CT {
2212 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2214 if(getverdict==pass) {
2216 "www_example_org_type_substitution_e.ttcn",
2217 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2222 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2224 f_encDecTest_type_subs();
2228 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2230 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2232 if(getverdict==pass) {
2234 "www_example_org_type_substitution_chain_e.ttcn",
2235 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2240 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2242 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2244 if(getverdict==pass) {
2246 "www_example_org_type_substitution_abstract_block_e.ttcn",
2247 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2252 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2254 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2256 if(getverdict==pass) {
2258 "www_example_org_type_substitution_mod1_e.ttcn",
2259 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2262 if(getverdict==pass) {
2264 "www_example_org_type_substitution_mod2_e.ttcn",
2265 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2270 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2272 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2274 if(getverdict==pass) {
2276 "www_example_org_type_substitution_simpletype_e.ttcn",
2277 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2282 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2284 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2286 if(getverdict==pass) {
2288 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2289 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2294 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2296 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2298 if(getverdict==pass) {
2300 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2301 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2304 if(getverdict==pass) {
2306 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2307 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2312 testcase tc_only_element_substitution() runs on xmlTest_CT {
2314 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2316 if(getverdict==pass) {
2318 "www_example_org_only_element_substitution_e.ttcn",
2319 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2324 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2326 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2328 if(getverdict==pass) {
2330 "www_example_org_type_substitution_builtintype_e.ttcn",
2331 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2336 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2338 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2340 if(getverdict==pass) {
2342 "www_example_org_type_substitution_rename_e.ttcn",
2343 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2348 testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {
2350 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)
2352 if(getverdict==pass) {
2354 "www_example_org_type_substitution_complex_cascade_e.ttcn",
2355 "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2360 testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {
2362 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)
2364 if(getverdict==pass) {
2366 "www_example_org_type_substitution_simple_cascade_e.ttcn",
2367 "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2374 //========================================================
2375 // tc_element_nameInheritance_conv
2376 // Checks if name of named (aliased) type is not inherited
2377 //========================================================
2378 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2379 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2382 //========================================
2383 // tc_element_nameInheritance_encDec
2384 // Checks if name of named (aliased) type is not inherited
2385 //========================================
2387 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2388 f_encDecTest_nameInheritance();
2391 //========================================
2392 // tc_element_Tgc_encDec
2393 // Checks if name of named (aliased) type is not inherited
2394 //========================================
2396 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2400 testcase tc_element_abstract_conv() runs on xmlTest_CT {
2401 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
2404 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2405 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2407 if(getverdict==pass) {
2409 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2413 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2414 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2416 if(getverdict==pass) {
2418 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2422 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2423 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2425 if(getverdict==pass) {
2427 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2428 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2432 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2433 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2435 if(getverdict==pass) {
2437 "www_example_org_type_attributegroup_nillable_e.ttcn",
2438 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2442 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2443 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2445 if(getverdict==pass) {
2447 "www_example_org_attribgroup_ingroup_e.ttcn",
2448 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2452 //IndividualTrigger, nile="false"
2453 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2454 f_encDecTest_IndividualTrigger1();
2457 //IndividualTrigger, nil="true"
2458 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2459 f_encDecTest_IndividualTrigger2(); //empty record
2463 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2464 f_encDecTest_Isp1();
2468 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2469 f_encDecTest_Isp2();
2472 //RemarkNillable, nil="false"
2473 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2474 f_encDecTest_RemarkNillable1();
2477 //RemarkNillable, nil="true"
2478 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2479 f_encDecTest_RemarkNillable2();
2484 //=========================================================================
2486 //=========================================================================
2489 execute(tc_versionTest());//Passed
2490 execute(tc_xsd2ttcn_versionTest());//Passed
2492 execute(tc_firstTrial());//Passed
2493 execute(tc_secondTrial());//Passed
2494 execute(tc_empty()); //Passed, TR:
2495 //appended to increase coverage:
2497 execute(tc_annotation());
2498 execute(tc_annotation1());
2499 execute(tc_annotation2());
2500 execute(tc_xml_in_annotation());
2502 execute(tc_version());
2503 execute(tc_options_c());
2504 execute(tc_options_e());
2505 execute(tc_options_f());
2506 execute(tc_options_g());
2507 execute(tc_options_p());
2508 execute(tc_options_s());
2509 execute(tc_options_t());
2510 execute(tc_options_v());
2511 execute(tc_options_V());
2512 execute(tc_options_w());
2513 execute(tc_options_x());
2514 execute(tc_options_wrong());
2515 execute(tc_options_missing());
2516 //===LABEL and DEFINITION - unknown but used tags
2518 //===ttcn standard===
2519 execute(tc_XmlTest_all());//Passed
2520 execute(tc_element_in_all_neg());
2521 execute(tc_XmlTest_any_anyAttribute());//Passed
2522 execute(tc_XmlTest_HQ73011());//Passed
2523 execute(tc_anyattribute_optional());
2524 execute(tc_anyattribute_single());
2525 execute(tc_anyattribute_in_complex());
2526 execute(tc_XmlTest_attributeGroup());//Passed
2527 execute(tc_XmlTest_attribute_use_noTNS());//Passed
2528 execute(tc_id_attribute());
2529 execute(tc_attribute_order());
2530 execute(tc_name_conv_non_alphanumeric());
2531 execute(tc_module_name_convert_with_diff_namespace());
2532 execute(tc_module_typename_conversion());
2533 execute(tc_name_conv_remove_seq_of_low_line());
2534 execute(tc_name_conv_with_z());
2535 execute(tc_comment_placement());
2537 //===W3C standard===
2540 execute(tc_string()); //passed
2541 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2542 execute(tc_string_withEnum());//Passed, TR: HL26227
2543 execute(tc_string_withPosLength());//TR: HL21257,
2544 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2545 execute(tc_string_withNegativeLength());//Passed
2546 execute(tc_string_withFixedLength()); //Passed
2547 execute(tc_fixed_value());
2548 execute(tc_string_withFloatLength()); //passed ???
2549 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2550 execute(tc_string_withEmptyMin());//Passed
2551 execute(tc_string_withNegativeMin());//Passed
2552 execute(tc_string_withPosMax())//Passed
2553 execute(tc_string_withEmptyMax());//Passed
2554 execute(tc_string_withNegativeMax());//Passed
2555 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2556 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2557 execute(tc_string_withTypeAndBase());//Passed
2558 //TODO: put this test back later
2559 //execute(tc_string_pattern_square_brackets());
2561 execute(tc_boolean());//Passed
2562 execute(tc_boolean_variant_commented());
2564 execute(tc_decimal());//Passed
2565 //execute(tc_decimal_withLength()); length not supported
2566 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2567 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2568 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
2569 execute(tc_decimal_fractiondigits());
2571 execute(tc_integer());//Passed
2572 execute(tc_integer_empty1());//Passed
2573 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2574 execute(tc_integer_withMinIncl());//Passed
2575 execute(tc_integer_withMaxIncl());//Passed
2576 execute(tc_integer_withMinExcl());//Passed
2577 execute(tc_integer_withMaxExcl());//Passed
2579 execute(tc_time());//passed
2580 execute(tc_time_withEnum());//Passed TR HL22058
2582 execute(tc_list_conv()); //Passed
2583 execute(tc_list_encDec());//Passed
2584 execute(tc_integerList());//Passed
2585 execute(tc_list_simpletype());//Passed
2586 execute(tc_list_complextype());
2588 execute(tc_float_not_a_number());
2590 //===simpleType enum====
2591 execute(tc_simpleType_enum());//Passed
2592 execute(tc_simpleType_restrict_comp());
2593 execute(tc_simpleType_ref());
2594 execute(tc_simpleType_base());
2595 execute(tc_enum_field_names());
2596 execute(tc_attribute_enumeration_variant());
2598 execute(tc_union());//TR:HL23577
2599 execute(tc_union_optional());//CR_TR18883
2600 execute(tc_enumeration_union_restriction());
2601 execute(tc_enumeration_union_restriction2());
2602 execute(tc_enumeration_remove_dup());
2604 execute(tc_complex1()); //Passed
2605 execute(tc_complex2());//TR: HL24977
2606 execute(tc_complex_simpleContent());
2607 execute(tc_complex_namespaceas());
2608 execute(tc_complex_mixed_conv()); //Passed
2609 execute(tc_complex_group_reference());
2610 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
2611 execute(tc_complex_seq_embeds_seq());
2612 execute(tc_complex_choice_converter());//Passed
2613 execute(tc_complex_choice_encDec());//Passed
2615 execute(tc_complex_all_converter());//Passed
2616 execute(tc_complex_all_emptySet_encDec());//Passed
2617 execute(tc_complex_all_fullSet_encDec());//Passed
2618 execute(tc_complex_all_subSet_encDec());//Passed
2619 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2620 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2621 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2622 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2623 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2624 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2625 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2626 execute(tc_complex_extension_converter()); //TR HL32505
2627 execute(tc_complex_extension_encDec()); //Passed
2628 execute(tc_complex_extension_name_attrib_convert());
2629 execute(tc_complex_long_extension());
2630 execute(tc_type_name_conversion_follow());
2631 execute(tc_complex_extension_with_attrib());
2632 execute(tc_extension_restriction_with_attrib());
2633 execute(tc_attrib_enum());
2634 execute(tc_complex_self_recursion());
2635 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
2636 execute(tc_complex_restriction_with_use());
2637 execute(tc_complex_nillable());
2638 execute(tc_nillable_fixed());
2639 execute(tc_no_ns_connector());
2643 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
2648 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2649 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2650 execute(tc_complex_unique_converter());
2651 execute(tc_complex_include_converter());
2652 execute(tc_complex_include_neg1_converter());
2653 execute(tc_complex_include_without_namespace());
2654 execute(tc_complex_import_pos1_converter());
2655 execute(tc_complex_import_pos2_converter());
2656 execute(tc_complex_import_neg1_converter());
2657 execute(tc_complex_import_withSL_converter());//SchemaLocation
2658 execute(tc_complex_import_withSL_encDec());
2659 execute(tc_complex_import_nameCollision_converter());
2660 execute(tc_complex_import_nameCollision2_converter());
2661 execute(tc_complex_any_pos_converter());
2662 execute(tc_imported_type_prefix());
2663 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2664 execute(tc_complex_any_pos2_encDec());
2665 execute(tc_complex_any_pos3_encDec());//failed, TR:
2667 execute(tc_element_anyType_converter());//Passed
2668 execute(tc_element_attrib_qualified());
2669 execute(tc_element_attrib_unqualified());
2670 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2671 execute(tc_element_anyType_attrOnly_encDec());//Passed
2672 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2673 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2674 execute(tc_element_anyType_encDec());//Passed, HL29711
2675 execute(tc_element_anyType_embed_encDec());
2676 execute(tc_element_anyType_deeper_encDec());
2677 execute(tc_element_anyType_longer_encDec());
2678 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2679 execute(tc_element_recOfElements_encDec());//Passed
2680 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2681 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2682 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2683 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2684 execute(tc_element_recOfElements_anonymousType_conv());
2685 execute(tc_element_recOfElements_anonymousType_encDec());
2688 //===substitutiongroup===
2689 execute(tc_substitutiongroup());
2690 execute(tc_substitutiongroup_name_as());
2691 execute(tc_substitutiongroup_abstract_block_rest());
2692 execute(tc_substitutiongroup_abstract_block_ext());
2693 execute(tc_substitutiongroup_complex_without_element());
2694 execute(tc_substitutiongroup_long_extension());
2695 execute(tc_substitutiongroup_complextype_block());
2696 execute(tc_substitutiongroup_notargetnamespace());
2697 execute(tc_substitutiongroup_neg());
2698 execute(tc_substitutiongroup_diff_module());
2699 execute(tc_substitutiongroup_rename());
2700 execute(tc_substitutiongroup_endDec());
2702 //===type substitution===
2703 execute(tc_type_substitution());
2704 execute(tc_type_substitution_encDec());
2705 execute(tc_type_substitution_chain());
2706 execute(tc_type_substitution_abstract_block());
2707 execute(tc_type_substitution_diff_module());
2708 execute(tc_type_substitution_simpletype());
2709 execute(tc_type_substitution_with_elem_substitution());
2710 execute(tc_type_substitution_element_in_ct());
2711 execute(tc_only_element_substitution());
2712 execute(tc_type_substitution_builtintype());
2713 execute(tc_type_substitution_rename());
2714 execute(tc_type_substitution_complex_cascade());
2715 execute(tc_type_substitution_simple_cascade());
2719 execute(tc_element_nameInheritance_conv());
2720 execute(tc_element_nameInheritance_encDec());//TR HL49978
2721 execute(tc_element_Tgc_encDec());//TR HL49978
2722 execute(tc_element_abstract_conv()); //Not supported features
2723 execute(tc_element_nillable_converter());
2724 execute(tc_element_nillable_with_annotations());
2725 execute(tc_element_nillable_in_nillable_extension());
2726 execute(tc_element_attributegroup_nillable());
2727 execute(tc_element_attributegroup_ingroup());
2728 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2729 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2730 execute(tc_element_nillable_Isp_nilFalse_encDec());
2731 execute(tc_element_nillable_Isp_nilTrue_encDec());
2732 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2733 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2737 extension "version R1A02"; // a prerelease version
2738 extension "requiresTITAN R1C01";