1 /******************************************************************************
2 * Copyright (c) 2000-2015 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
7 ******************************************************************************/
9 //=========================================================================
10 // References: (XSD_0) XML Schema Part 0: Primer Second Edition
11 // (XSD_1) XML Schema Part 1: Structures Second Edition
12 // (XSD_2) XML Schema Part 2: Datatypes Second Edition
13 // (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3;
14 // Part 9: Using XML schema with TTCN-3
15 // Last modified: 2013-12-02 by ethbaat
16 // Temporarily commented out: tc_complex_import_withSL_encDec fails on some platforms because of TR:HR88527
18 module xmlTest_Testcases
21 //=========================================================================
23 //=========================================================================
24 //import from XSD all;
25 import from PIPEasp_Types all;
26 import from PIPEasp_PortType all;
27 import from PIPEasp_Templates all;
28 import from xmlTest_Shell all;
30 import from www_XmlTest_org_element_anyType_e all;
31 import from www_XmlTest_org_complex_all_e all;
32 import from www_XmlTest_org_complex_extension_e all;
33 import from www_XmlTest_org_complex_restriction_e all;
34 import from www_XmlTest_org_complex_import_e all;
35 import from www_XmlTest_org_complex_any_e all;
37 import from xmlTest_Functions_string all;
38 import from xmlTest_Functions_complex1 all;
39 import from xmlTest_Functions_complex2 all;
40 import from xmlTest_Functions_complex all;
41 import from xmlTest_Functions_element all;
42 import from xmlTest_Functions_list all;
45 //=========================================================================
47 //=========================================================================
49 // Insert module parameters here if applicable!
50 // You can use the module_param skeleton!
52 //=========================================================================
54 //=========================================================================
56 // Insert data type defintions here if applicable!
57 // You can use the data_type skeleton!
59 //=========================================================================
61 //=========================================================================
63 // Insert signature definitions here if applicable!
64 // You can use the signature skeleton!
66 //=========================================================================
68 //=========================================================================
70 // Insert port type defintions here if applicable!
71 // You can use the port_type skeleton!
73 //=========================================================================
75 //=========================================================================
77 type component xmlTest_CT extends Shell_CT {}
79 type component mtc_CT {}
80 //=========================================================================
82 //=========================================================================
85 //=========================================================================
87 //=========================================================================
89 // Insert templates here if applicable!
90 // You can use the template skeleton!
92 //=========================================================================
94 //=========================================================================
96 // Insert altsteps here if applicable!
97 // You can use the altstep skeleton!
99 //=========================================================================
101 //=========================================================================
103 //=========================================================================
105 //=========================================================================
106 function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) {
109 var integer vl_size:=lengthof(pl_string);
110 var integer vl_delimsize:=lengthof(pl_delimiter);
112 if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1}
117 //=========================================================================
119 //=========================================================================
120 //pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference
121 function f_compareFiles(in charstring pl_file1, in charstring pl_file2, in integer pl_diffLimit) runs on xmlTest_CT {
122 var integer vl_expectedResult:=0
123 if(pl_diffLimit>0) { vl_expectedResult:=256; }
124 var boolean vl_success:=false;
125 f_shell_command("diff -w " & pl_file1 & " " & pl_file2,"",vl_expectedResult,vl_success);
127 if(v_ASP_PResult.code==0)
131 else if(v_ASP_PResult.code==256) {
132 var integer vl_counter:=0;
133 f_countDelimiters(v_ASP_PResult.stdout,"\n",vl_counter);
134 log("Counted lines: ",vl_counter, " diffLimit: ", pl_diffLimit)
135 if(vl_counter>pl_diffLimit) {
138 } else { //e.g 512: No such file or directory
139 log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult)
145 //=========================================================================
147 //=========================================================================
148 testcase tc_versionTest() runs on xmlTest_CT
150 f_shellCommandWithVerdict("compiler -v","",0)
153 testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
155 f_shellCommandWithVerdict("xsd2ttcn -v","",0)
159 testcase tc_firstTrial() runs on xmlTest_CT
161 f_shellCommandWithVerdict("xsd2ttcn elements.xsd","",c_shell_successWithoutWarningAndError);
163 if(getverdict==pass) {
165 "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff_headerAndModuleName);
169 // see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema
170 // This tc is "passed" but it is generated into noTargetNaespace.ttcn
171 testcase tc_secondTrial() runs on xmlTest_CT
173 f_shellCommandWithVerdict("xsd2ttcn po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);
175 if(getverdict==pass) {
177 "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff_headerAndModuleName);
180 testcase tc_empty() runs on xmlTest_CT
182 f_shellCommandWithVerdict("xsd2ttcn empty.xsd","",c_shell_successWithoutWarningAndError);
184 if(getverdict==pass) {
186 "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName);
190 testcase tc_annotation() runs on xmlTest_CT
192 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation.xsd","",c_shell_successWithWarning);
193 if(getverdict==pass) {
195 "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
199 testcase tc_annotation1() runs on xmlTest_CT
201 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
202 //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
205 testcase tc_annotation2() runs on xmlTest_CT
207 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation2.xsd","",c_shell_error);
208 //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
211 testcase tc_xml_in_annotation() runs on xmlTest_CT
213 f_shellCommandWithVerdict("xsd2ttcn xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
214 if(getverdict==pass) {
216 "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
220 //Incorrect version: 1.1, libxml parser prints warning
221 testcase tc_version() runs on xmlTest_CT
223 f_shellCommandWithVerdict("xsd2ttcn XmlTest_version.xsd","",c_shell_successWithWarning);
226 //************************************
227 // === Converter switch tests: ===
228 //************************************
229 // usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ...
233 // -c: disable the generation of comments in TTCN-3 modules
234 // -e: disable the generation of encoding instructions in TTCN-3 modules
235 // -f file: the XSD files are taken from file instead of the command line
236 // -p: do not generate the UsefulTtcn3Types and XSD predefined modules
237 // -q: quiet - disable the issue of status messages
238 // -s: parse and validate only - no TTCN-3 module generation
239 // -t: disable the generation of timing information in TTCN-3 modules
240 // -v: show version information
241 // -w: suppress warnings
242 // -x: disable schema validation but generate TTCN-3 modules
245 testcase tc_options_c() runs on xmlTest_CT
247 f_shellCommandWithVerdict("xsd2ttcn -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
248 if(getverdict==pass) {
249 f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
253 // -e: disable the generation of encoding instructions in TTCN-3 modules
254 testcase tc_options_e() runs on xmlTest_CT
256 f_shellCommandWithVerdict("xsd2ttcn -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
257 if(getverdict==pass) {
258 f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
262 // -f file: the XSD files are taken from file instead of the command line
263 testcase tc_options_f() runs on xmlTest_CT
265 f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithWarning );
266 if(getverdict==pass) {
267 f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
271 testcase tc_options_g() runs on xmlTest_CT
273 f_shellCommandWithVerdict("xsd2ttcn -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
274 if(getverdict==pass) {
275 f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
276 "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
279 f_shellCommandWithVerdict("xsd2ttcn generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
280 if(getverdict==pass) {
281 f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
282 "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
286 //-p: do not generate the UsefulTtcn3Types and XSD predefined modules
287 testcase tc_options_p() runs on xmlTest_CT
289 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
290 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
291 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
293 f_shellCommandWithVerdict("xsd2ttcn -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
294 if(getverdict==pass) {
295 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError);
296 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
297 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
300 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
301 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
302 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
305 //-s: parse and validate only - no TTCN-3 module generation
306 testcase tc_options_s() runs on xmlTest_CT
308 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
309 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
310 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
312 f_shellCommandWithVerdict("xsd2ttcn -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
313 //TODO:test if wrong xsd causes conversion error wit this switch
315 //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist:
316 if(getverdict==pass) {
317 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory );
318 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
319 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
321 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
322 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
323 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
327 // -t: disable the generation of timing information in TTCN-3 modules
328 testcase tc_options_t() runs on xmlTest_CT
330 f_shellCommandWithVerdict("xsd2ttcn -t XmlTest_annotation.xsd","",c_shell_successWithWarning );
331 if(getverdict==pass) {
332 f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_header);
336 // -v: show version information
338 testcase tc_options_v() runs on xmlTest_CT
340 f_shellCommandWithVerdict("xsd2ttcn -v","",c_shell_successWithoutWarningAndError );
344 // -q: quiet - disable the issue of status messages
345 testcase tc_options_V() runs on xmlTest_CT
347 f_shellCommandWithVerdict("xsd2ttcn -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
350 // -w: suppress warnings
351 testcase tc_options_w() runs on xmlTest_CT
353 f_shellCommandWithVerdict("xsd2ttcn -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
357 // -x: disable schema validation but generate TTCN-3 modules
358 testcase tc_options_x() runs on xmlTest_CT
360 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
363 testcase tc_options_wrong() runs on xmlTest_CT
365 f_shellCommandWithVerdict("xsd2ttcn -H XmlTest_annotation.xsd","", c_shell_error);
368 testcase tc_options_missing() runs on xmlTest_CT
370 f_shellCommandWithVerdict("xsd2ttcn ","",c_shell_successWithoutWarningAndError );
371 //TODO: check the output
375 testcase tc_XmlTest_label() runs on xmlTest_CT
377 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
380 testcase tc_XmlTest_definition() runs on xmlTest_CT
382 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
384 //************************************
385 // Testcases_basedOnTtcnStandard9
386 //************************************
387 group Testcases_basedOnTtcnStandard9 {
390 testcase tc_XmlTest_all() runs on xmlTest_CT
392 f_shellCommandWithVerdict("xsd2ttcn all.xsd","",c_shell_successWithoutWarningAndError);
393 if(getverdict==pass) {
395 "www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName);
399 testcase tc_element_in_all_neg() runs on xmlTest_CT
401 f_shellCommandWithVerdict("xsd2ttcn element_in_all_minmax.xsd","",c_shell_error);
405 testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
407 f_shellCommandWithVerdict("xsd2ttcn any_anyAttribute.xsd","",c_shell_successWithWarning);
409 if(getverdict==pass) {
411 "http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
416 //Heading: XSD anyAtribute is inserted into a wrong place
418 testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
420 f_shellCommandWithVerdict("xsd2ttcn HQ73011.xsd","",c_shell_successWithoutWarningAndError);
421 if(getverdict==pass) {
423 "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName);
427 testcase tc_anyattribute_optional() runs on xmlTest_CT
429 f_shellCommandWithVerdict("xsd2ttcn anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
430 if(getverdict==pass) {
432 "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
436 testcase tc_anyattribute_single() runs on xmlTest_CT
438 f_shellCommandWithVerdict("xsd2ttcn anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
439 if(getverdict==pass) {
441 "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName);
445 testcase tc_anyattribute_in_complex() runs on xmlTest_CT
447 f_shellCommandWithVerdict("xsd2ttcn anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
448 if(getverdict==pass) {
450 "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace);
456 testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
458 f_shellCommandWithVerdict("xsd2ttcn attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
460 if(getverdict==pass) {
462 "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
466 //double schema definition - Validator Returns with Error, Passed
467 testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
469 f_shellCommandWithVerdict("xsd2ttcn attribute_use_noTNS.xsd","",c_shell_error);
472 testcase tc_id_attribute() runs on xmlTest_CT
474 f_shellCommandWithVerdict("xsd2ttcn id_attrib.xsd","",c_shell_successWithWarning);
475 if(getverdict==pass) {
477 "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName);
481 testcase tc_attribute_order() runs on xmlTest_CT
483 f_shellCommandWithVerdict("xsd2ttcn attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
484 if(getverdict==pass) {
486 "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName);
489 if(getverdict==pass) {
491 "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName);
495 testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
497 f_shellCommandWithVerdict("xsd2ttcn name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
498 if(getverdict==pass) {
500 "http_www_example_org_name_conv2_e.ttcn",
501 "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName);
505 testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
506 f_shellCommandWithVerdict("xsd2ttcn imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
508 if(getverdict==pass) {
510 "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName);
513 if(getverdict==pass) {
515 "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName);
519 testcase tc_module_typename_conversion() runs on xmlTest_CT {
520 f_shellCommandWithVerdict("xsd2ttcn module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
522 if(getverdict==pass) {
524 "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName);
527 if(getverdict==pass) {
529 "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName);
533 testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
535 f_shellCommandWithVerdict("xsd2ttcn name_conv_remove_seq_of_low_line.xsd","",
536 c_shell_successWithoutWarningAndError);
537 if(getverdict==pass) {
539 "http_www_example_org_name_conv3_e.ttcn",
540 "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName);
544 testcase tc_name_conv_with_z() runs on xmlTest_CT
546 f_shellCommandWithVerdict("xsd2ttcn -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
547 if(getverdict==pass) {
549 "www_example_org_name_conv_http_e.ttcn",
550 "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName);
554 testcase tc_comment_placement() runs on xmlTest_CT
556 f_shellCommandWithVerdict("xsd2ttcn comment_placement.xsd","",c_shell_successWithoutWarningAndError);
557 if(getverdict==pass) {
559 "www_example_org_comment_placement_e.ttcn",
560 "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName);
566 //************************************
567 // Testcases based on W3C standards
568 //************************************
570 //******************************
572 //******************************
575 //=== Correct string type definitions: ====
576 //TR HL21086 - whitespace preserve. TODO: standalone testcase
577 testcase tc_string() runs on xmlTest_CT
579 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
580 if(getverdict==pass) {
582 "www_XmlTest_org_string.ttcn",
583 "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace);
585 ////////////////////////////////////////////
587 // f_encDecTest_NameA();
588 // f_encDecTest_NameB();
589 // f_encDecTest_Non_empty_string();
590 // f_encDecTest_Type();
592 ////////////////////////////////////////////
595 //Passed, TR: Hl21086 - Solved
596 testcase tc_string_withWhitespace() runs on xmlTest_CT
598 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
599 if(getverdict==pass) {
601 "www_XmlTest_org_string_withWhitespace.ttcn",
602 "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName);
604 f_encDecTest_StringWhiteSpaceP();
605 f_encDecTest_StringWhiteSpaceR();
606 f_encDecTest_StringWhiteSpaceC();
609 //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!!
610 testcase tc_string_withEnum() runs on xmlTest_CT
612 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
613 if(getverdict==pass) {
615 "www_XmlTest_org_string_withEnum.ttcn",
616 "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName);
618 f_encDecTest_StringEnum();
620 //TODO: Write length of child restriction tests based on tc_string!!!
622 //=== Length restriction tests ===
626 //=== Faulty String definitions: =========
629 //TR: HL21257 --Solved
630 testcase tc_string_withPosLength() runs on xmlTest_CT
632 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
633 if(getverdict==pass) {
635 "www_XmlTest_org_string_withPosLength.ttcn",
636 "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName);
640 //Passed, returs with error
641 testcase tc_string_withEmptyLength() runs on xmlTest_CT
643 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyLength.xsd","",c_shell_error)
646 testcase tc_string_withNegativeLength() runs on xmlTest_CT
648 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeLength.xsd","",c_shell_error)
652 testcase tc_string_withFixedLength() runs on xmlTest_CT
654 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFixedLength.xsd","",c_shell_error);
657 testcase tc_fixed_value() runs on xmlTest_CT
659 f_shellCommandWithVerdict("xsd2ttcn fixed_value.xsd","",c_shell_successWithWarning);
660 if(getverdict==pass) {
662 "www_example_org_fixed_value.ttcn",
663 "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName);
668 testcase tc_string_withFloatLength() runs on xmlTest_CT
670 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFloatLength.xsd","", c_shell_error)
674 //Passed, TR: HL21690
675 testcase tc_string_withPosMinLength() runs on xmlTest_CT
677 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
678 if(getverdict==pass) {
680 "www_XmlTest_org_string_withMinLength.ttcn",
681 "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName);
686 testcase tc_string_withEmptyMin() runs on xmlTest_CT
688 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMin.xsd","",c_shell_error)
692 testcase tc_string_withNegativeMin() runs on xmlTest_CT
694 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMin.xsd","",c_shell_error)
699 testcase tc_string_withPosMax() runs on xmlTest_CT
701 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
702 if(getverdict==pass) {
704 "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName);
709 testcase tc_string_withEmptyMax() runs on xmlTest_CT
711 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMax.xsd","",c_shell_error)
715 testcase tc_string_withNegativeMax() runs on xmlTest_CT
717 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMax.xsd","",c_shell_error)
719 //=== minLength>maxLength
721 testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
723 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
726 testcase tc_string_withOverDefinition() runs on xmlTest_CT
728 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withOverDefinition.xsd","",c_shell_error)
731 testcase tc_string_withTypeAndBase() runs on xmlTest_CT
733 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
736 //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
738 // f_shellCommandWithVerdict("xsd2ttcn regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
739 // if(getverdict==pass) {
741 // "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName);
746 //******************************
748 //******************************
751 //TODO: check warning sending for not supported:features
752 testcase tc_boolean() runs on xmlTest_CT {
753 f_shellCommandWithVerdict("xsd2ttcn XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
754 if(getverdict==pass) {
756 "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName);
760 testcase tc_boolean_variant_commented() runs on xmlTest_CT {
761 f_shellCommandWithVerdict("xsd2ttcn boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
762 if(getverdict==pass) {
764 "www_example_org_boolean_variant_commented_e.ttcn",
765 "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName);
771 //******************************
773 //******************************
777 testcase tc_decimal() runs on xmlTest_CT {
778 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
779 if(getverdict==pass) {
781 "www_XmlTest_org_decimal_e.ttcn",
782 "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName);
786 //!!!!!Length not supported!!!!
787 // testcase tc_decimal_withLength() runs on xmlTest_CT {
788 // f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
789 // if(getverdict==pass) {
791 // "www_XmlTest_org_decimal_withLength_e.ttcn",
792 // "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName);
796 //TR: Generates integer limits instead of decimal
798 testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
799 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
801 if(getverdict==pass) {
803 "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
804 "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName);
809 testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
810 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
812 if(getverdict==pass) {
814 "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
815 "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName);
820 testcase tc_decimal_withEnum() runs on xmlTest_CT {
821 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
823 if(getverdict==pass) {
825 "www_XmlTest_org_decimal_withEnum_e.ttcn",
826 "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
830 testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
831 f_shellCommandWithVerdict("xsd2ttcn decimal_fractiondigits.xsd","",c_shell_successWithWarning)
833 if(getverdict==pass) {
835 "www_example_org_decimal_fractiondigits_e.ttcn",
836 "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName);
841 //******************************
843 // Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1
844 //******************************
847 testcase tc_integer() runs on xmlTest_CT {
848 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
850 if(getverdict==pass) {
852 "www_XmlTest_org_integer_e.ttcn",
853 "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName);
859 testcase tc_integer_empty1() runs on xmlTest_CT {
860 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_empty1.xsd","",c_shell_error)
864 testcase tc_integer_withLength() runs on xmlTest_CT {
865 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withLength.xsd","",c_shell_error)
868 //Ready, passed, TR:HL21694 -solved
869 testcase tc_integer_withEnum() runs on xmlTest_CT {
870 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
872 if(getverdict==pass) {
874 "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
879 testcase tc_integer_withMinIncl() runs on xmlTest_CT {
880 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
882 if(getverdict==pass) {
884 "www_XmlTest_org_integer_withMinIncl_e.ttcn",
885 "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName);
890 testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
891 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
893 if(getverdict==pass) {
895 "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName);
900 testcase tc_integer_withMinExcl() runs on xmlTest_CT {
901 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
903 if(getverdict==pass) {
905 "www_XmlTest_org_integer_withMinExcl_e.ttcn",
906 "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName);
911 testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
912 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
914 if(getverdict==pass) {
916 "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName);
924 testcase tc_float_not_a_number() runs on xmlTest_CT {
925 f_shellCommandWithVerdict("xsd2ttcn not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
927 if(getverdict==pass) {
929 "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
930 "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName);
935 testcase tc_simpleType_enum() runs on xmlTest_CT {
937 f_shellCommandWithVerdict("xsd2ttcn XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
939 if(getverdict==pass) {
941 "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName);
946 testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {
948 f_shellCommandWithVerdict("xsd2ttcn simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
950 if(getverdict==pass) {
952 "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName);
957 testcase tc_simpleType_ref() runs on xmlTest_CT {
959 f_shellCommandWithVerdict("xsd2ttcn simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
961 if(getverdict==pass) {
963 "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName);
968 testcase tc_simpleType_base() runs on xmlTest_CT {
970 f_shellCommandWithVerdict("xsd2ttcn simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
972 if(getverdict==pass) {
974 "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName);
980 testcase tc_enum_field_names() runs on xmlTest_CT {
982 f_shellCommandWithVerdict("xsd2ttcn enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
984 if(getverdict==pass) {
986 "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName);
991 testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {
993 f_shellCommandWithVerdict("xsd2ttcn attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
995 if(getverdict==pass) {
997 "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff_headerAndModuleName);
1002 //******************************
1004 // Based on (XSD_2)/
1005 //******************************
1009 testcase tc_time() runs on xmlTest_CT {
1010 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
1012 if(getverdict==pass) {
1014 "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName);
1019 testcase tc_time_withEnum() runs on xmlTest_CT {
1020 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
1022 if(getverdict==pass) {
1024 "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
1031 testcase tc_list_conv() runs on xmlTest_CT {
1033 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
1035 if(getverdict==pass) {
1037 "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName);
1040 // restrictions:length, minLength, maxLength, pattern, and enumeration.
1043 testcase tc_list_encDec() runs on xmlTest_CT {
1044 f_encDecTest_StringList();
1047 testcase tc_integerList() runs on xmlTest_CT {
1049 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
1051 if(getverdict==pass) {
1053 "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName);
1058 testcase tc_list_simpletype() runs on xmlTest_CT {
1060 f_shellCommandWithVerdict("xsd2ttcn list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
1062 if(getverdict==pass) {
1064 "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName);
1072 testcase tc_union() runs on xmlTest_CT {
1074 f_shellCommandWithVerdict("xsd2ttcn XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
1076 if(getverdict==pass) {
1078 "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
1082 testcase tc_union_optional() runs on xmlTest_CT {
1084 f_shellCommandWithVerdict("xsd2ttcn ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
1086 if(getverdict==pass) {
1088 "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
1092 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {
1094 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction.xsd","",c_shell_successWithWarning)
1096 if(getverdict==pass) {
1098 "www_example_org_enumeration_restriction_e.ttcn",
1099 "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1103 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {
1105 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
1107 if(getverdict==pass) {
1109 "www_example_org_seq_enumeration_restriction_e.ttcn",
1110 "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1114 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {
1116 f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
1118 if(getverdict==pass) {
1120 "www_example_org_enumeration_remove_dup_e.ttcn",
1121 "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
1131 testcase tc_complex1() runs on xmlTest_CT {
1133 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
1135 if(getverdict==pass) {
1137 "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
1138 f_encDecTest_InternationalPrice();
1142 //TR: HL24977 -Solved
1143 testcase tc_complex2() runs on xmlTest_CT {
1145 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
1147 if(getverdict==pass) {
1149 "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
1151 f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
1152 f_encDecTest_InternationalPrice3();
1153 f_encDecTest_InternationalPrice4();
1156 testcase tc_complex_simpleContent() runs on xmlTest_CT {
1158 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
1160 if(getverdict==pass) {
1162 "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
1163 f_encDecTest_ComplexTypeWithSimpleContent1();
1164 f_encDecTest_ComplexTypeWithSimpleContent2();
1165 f_encDecTest_ComplexTypeWithSimpleContent2_neg();
1169 testcase tc_complex_namespaceas() runs on xmlTest_CT {
1171 f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
1173 if(getverdict==pass) {
1175 "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
1177 "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
1181 testcase tc_complex_mixed_conv() runs on xmlTest_CT {
1183 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
1185 if(getverdict==pass) {
1187 "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
1191 testcase tc_complex_group_reference() runs on xmlTest_CT {
1193 f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
1195 if(getverdict==pass) {
1197 "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
1202 testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
1203 f_encDecTest_ComplexTypeWithMixed();
1206 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {
1208 f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
1210 if(getverdict==pass) {
1212 "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
1213 f_encDecTest_InternationalPrice();
1217 testcase tc_complex_choice_converter() runs on xmlTest_CT {
1219 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
1221 if(getverdict==pass) {
1223 "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
1228 testcase tc_complex_choice_encDec() runs on xmlTest_CT {
1229 f_encDecTest_ComplexTypeWithChoice_1();
1230 f_encDecTest_ComplexTypeWithChoice_2();
1231 f_encDecTest_ComplexTypeWithChoice_3();
1232 f_encDecTest_ComplexTypeWithChoice_4();
1233 f_encDecTest_ComplexTypeWithChoice_5();
1234 f_encDecTest_ComplexTypeWithChoice_6();
1235 f_encDecTest_ComplexTypeWithChoice_7();
1236 f_encDecTest_ComplexTypeWithChoice_8();
1237 f_encDecTest_ComplexTypeWithChoice_9();
1238 f_encDecTest_ComplexTypeWithChoice_10();
1241 //Passed, TR: HL30830 -solved
1242 testcase tc_complex_all_converter() runs on xmlTest_CT {
1243 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
1245 if(getverdict==pass) {
1247 "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
1252 testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
1253 var MySubjects1 vl_pdu:= {
1261 var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
1262 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1265 testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
1266 var MySubjects1 vl_pdu:= {
1267 order:={math,english,chemistry, physics},
1269 english:="Advanced Group 1",
1270 math:="Beginners 1",
1271 physics:="Mechanics 1",
1274 var charstring vl_expectedEncodedPdu:=
1275 "<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"
1276 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1279 testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
1280 var MySubjects1 vl_pdu:= {
1281 order:={math,english,chemistry},
1283 english:="Advanced Group 1",
1284 math:="Beginners 1",
1289 order:={math,english},
1291 english:="Advanced Group 1",
1292 math:="Beginners 1",
1296 var charstring vl_expectedEncodedPdu:=
1297 "<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"
1298 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1301 testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
1302 f_encDecTest_ComplexTypeWithAll_inconsistentSet();
1305 //positive testcase for group "all". The type has no optional field (element).The input is correct
1306 testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
1307 var MySubjects2 vl_pdu:= {
1308 order:={math,english,chemistry, physics,history},
1310 english:="Advanced Group 1",
1311 math:="Beginners 1",
1312 physics:="Mechanics 1",
1316 var charstring vl_expectedEncodedPdu:=
1317 "<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";
1318 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
1321 //Negative testcase for group "all". The type has no optional field (element).
1322 //The input is not correct: value of one field (history) is missing
1323 //Passed, TR: HL32978
1324 testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
1325 var MySubjects2 vl_pdu:= {
1326 order:={math,english,chemistry, physics,history},
1328 english:="Advanced Group 1",
1329 math:="Beginners 1",
1330 physics:="Mechanics 1",
1334 var MySubjects2 vl_expectedDecodedPdu:= {
1335 order:={math,english,chemistry, physics,history},
1337 english:="Advanced Group 1",
1338 math:="Beginners 1",
1339 physics:="Mechanics 1",
1343 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"
1344 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
1347 //Negative testcase for group "all". The type has no optional field (element).
1348 //The input is not correct: value of one field (history) and its place in order-list is missing.
1349 // ***Less elements of record of order than required***
1350 //expectation: error report at encoding, returning 1 at decoding
1351 //Passed, TR: HL32978
1352 testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
1353 var MySubjects2 vl_pdu:= {
1354 order:={math,english,chemistry, physics},
1356 english:="Advanced Group 1",
1357 math:="Beginners 1",
1358 physics:="Mechanics 1",
1362 var MySubjects2 vl_expectedDecodedPdu:= {
1363 order:={math,english,chemistry, physics},
1365 english:="Advanced Group 1",
1366 math:="Beginners 1",
1367 physics:="Mechanics 1",
1371 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1372 //"<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"
1373 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
1376 //Negative testcase for group "all". The type has no optional field (element).
1377 //The input is not correct: order three times contains "math", Physics and history are missing.
1378 //expectation: error report at encoding, returning 1 at decoding
1379 //Passed, TR: HL32978
1380 testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
1381 var MySubjects2 vl_pdu:= {
1382 order:={math,english,chemistry,math,math},
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_pdu,1);
1396 //=========================================================================
1397 // tc_complex_all_noOptional_empty_encDec
1398 //=========================================================================
1399 //Negative testcase for group "all". The type has no optional field (element).
1400 //The input is not correct: value of all the fields and their place in order-list is missing
1401 //expectation: error report at encoding
1402 //Passed, TR: HL32978
1403 testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
1404 var MySubjects2 vl_pdu:= {
1407 //english:="Advanced Group 1",
1408 //math:="Beginners 1",
1409 //physics:="Mechanics 1",
1413 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1414 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1417 //=========================================================================
1418 // tc_complex_minOccursMaxOccurs
1419 //=========================================================================
1420 //Old name: tc_XmlTest_minOccursMaxOccurs
1421 ////TR (ethgry): HL10386
1422 testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
1424 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
1425 if(getverdict==pass) {
1427 "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
1432 testcase tc_complex_extension_converter() runs on xmlTest_CT {
1433 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
1435 if(getverdict==pass) {
1437 "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
1441 testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1442 f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
1444 if(getverdict==pass) {
1446 "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1450 testcase tc_complex_long_extension() runs on xmlTest_CT {
1451 f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)
1453 if(getverdict==pass) {
1455 "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
1459 testcase tc_complex_self_recursion() runs on xmlTest_CT {
1460 f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
1462 if(getverdict==pass) {
1464 "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
1468 testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1469 f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
1471 if(getverdict==pass) {
1473 "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
1477 testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1478 f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
1480 if(getverdict==pass) {
1482 "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
1486 testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1487 f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
1489 if(getverdict==pass) {
1491 "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
1495 testcase tc_attrib_enum() runs on xmlTest_CT {
1496 f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
1498 if(getverdict==pass) {
1500 "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
1504 testcase tc_complex_extension_encDec() runs on xmlTest_CT
1506 var MySubjects3Extension vl_pdu:={
1513 arts:="Impressionism"
1515 var charstring vl_expectedEncodedPdu:=
1516 "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
1517 f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1520 testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1521 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
1523 if(getverdict==pass) {
1525 "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1529 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1530 f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
1532 if(getverdict==pass) {
1534 "http_www_example_org_complex_restriction_with_use_e.ttcn",
1535 "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
1539 testcase tc_complex_nillable() runs on xmlTest_CT {
1540 f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
1542 if(getverdict==pass) {
1544 "www_example_org_complex_nillable_e.ttcn",
1545 "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
1549 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
1550 testcase tc_nillable_fixed() runs on xmlTest_CT {
1551 f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
1553 if(getverdict==pass) {
1555 "www_example_org_nillable_fixed_e.ttcn",
1556 "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
1560 testcase tc_no_ns_connector() runs on xmlTest_CT {
1561 f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
1563 if(getverdict==pass) {
1565 "www_example_org_no_ns_connector_e.ttcn",
1566 "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
1570 testcase tc_complex_restriction_encDec() runs on xmlTest_CT
1572 var MySubjects4Restriction vl_pdu:={
1575 math:="Combinatorics 1"
1577 var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
1578 f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1580 //TR: HL32948, Solved
1581 testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
1582 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
1585 //TR: HL32948, Solved
1586 testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
1587 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
1591 testcase tc_complex_unique_converter() runs on xmlTest_CT {
1592 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
1593 if(getverdict==pass) {
1595 "www_XmlTest_org_complex_unique_e.ttcn",
1596 "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff_headerModNameAndNamespace);
1600 //Positive test: The including and the included schema are in the same namespace
1601 testcase tc_complex_include_converter() runs on xmlTest_CT {
1602 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1604 if(getverdict==pass) {
1606 "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
1610 //=========================================================================
1611 // tc_complex_include_neg1_converter
1612 //=========================================================================
1613 //Negative test: The including and the included schema are not in the same namespace
1614 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1615 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1618 //=========================================================================
1619 // tc_complex_import_pos1_converter
1620 //=========================================================================
1621 //Positive test: The including and the included schema are in different namespaces (import and include)
1622 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1623 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1625 if(getverdict==pass) {
1627 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1630 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1634 //=========================================================================
1635 // tc_complex_import_pos2_converter
1636 //=========================================================================
1637 //Pos test: Checks if the converter can choose the file having the correct namespace
1638 //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
1639 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1640 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1642 if(getverdict==pass) {
1644 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1647 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1651 //=========================================================================
1652 // tc_complex_import_neg1_converter
1653 //=========================================================================
1654 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1655 //If the type checking is switched off the testcase fails.
1656 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1657 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1660 //=========================================================================
1661 // tc_complex_import_withSL_converter
1662 //=========================================================================
1663 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1664 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1665 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1667 if(getverdict==pass) {
1669 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1673 //=========================================================================
1674 // tc_complex_import_withSL_encDec
1675 //=========================================================================
1676 // TODO: fix HR88527
1677 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1678 var PurchaseReportImport pl_pdu:= {
1680 periodEnding :="1999-12-31",
1706 base:="Baby Monitor"
1711 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";
1712 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1713 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1716 //=========================================================================
1717 // tc_complex_import_nameCollision_converter
1718 //=========================================================================
1719 //imports the same type from different namespaces
1720 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1721 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1723 if(getverdict==pass) {
1725 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1727 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1729 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1733 //=========================================================================
1734 // tc_complex_import_nameCollision2_converter
1735 //=========================================================================
1736 //imports the same type from different namespaces
1737 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1738 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1741 //=========================================================================
1742 // tc_complex_any_pos_converter
1743 //=========================================================================
1744 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
1745 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
1747 if(getverdict==pass) {
1749 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1753 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1754 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1756 if(getverdict==pass) {
1758 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1763 //=========================================================================
1764 // tc_complex_any_pos1_encDec
1765 // Failed, TR: HL37887
1766 //=========================================================================
1767 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1769 var ElementContainingXhtml_1 vl_pdu := {
1770 firstField:="1st field",
1772 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1774 thirdField:="3rd field"
1776 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";
1777 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1780 //=========================================================================
1781 // tc_complex_any_pos2_encDec
1782 //=========================================================================
1783 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1785 var ElementContainingXhtml_2 vl_pdu := {
1787 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1790 var charstring vl_expectedEncodedPdu:=
1791 "<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";
1792 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1795 //=========================================================================
1796 // tc_complex_any_pos3_encDec
1797 // Failed, TR: HL37887
1798 //=========================================================================
1799 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1801 var ElementContainingXhtml_1 vl_pdu :=
1803 firstField := "1st field",
1805 "<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 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1807 thirdField := "3rd field"
1810 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";
1811 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1816 //=========================================================================
1818 //=========================================================================
1822 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1824 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1826 if(getverdict==pass) {
1828 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1832 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1834 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1836 if(getverdict==pass) {
1838 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1842 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1844 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1846 if(getverdict==pass) {
1848 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1852 //Passed TR: Hl29679
1853 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1854 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
1855 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
1856 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1860 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1861 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
1862 var charstring vl_expectedEncodedPdu:=
1863 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
1864 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1867 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1868 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1869 var charstring vl_expectedEncodedPdu:=
1870 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
1871 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1874 //Passed, TR: HL29711
1875 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1876 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1877 var charstring vl_expectedEncodedPdu:=
1878 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1879 var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1880 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1883 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1884 var Anything1 vl_pdu:= {
1885 embed_values := omit,
1886 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1887 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1888 var charstring vl_expectedEncodedPdu:=
1889 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1890 var Anything1 vl_expectedDecodedPdu:= {
1891 embed_values := omit,
1892 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1893 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1895 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1898 //===============================================================
1899 // tc_element_anyType_deeper_encDec
1900 //===============================================================
1901 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1902 var Anything1 vl_pdu:= {
1903 embed_values := omit,
1904 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1905 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>"} };
1907 var charstring vl_expectedEncodedPdu:=
1908 "<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";
1909 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1913 type record of charstring charstringList;
1915 //===============================================================
1916 // tc_element_anyType_longer_encDec
1917 //===============================================================
1918 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1919 var charstringList vl_elementList:= {
1920 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1921 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1922 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1923 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1925 var Anything1 vl_pdu:= {
1926 embed_values := omit,
1929 "nationality=\"HU\""
1934 var charstring vl_expectedEncodedPdu:=
1935 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
1937 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1938 vl_pdu.elem_list[i]:=vl_elementList[i];
1939 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
1941 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
1943 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1947 //===============================================================
1948 // tc_element_recOfElements_converter
1949 //===============================================================
1950 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
1951 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
1953 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1955 if(getverdict==pass) {
1957 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1961 //Passed, old name: tc_element_recOfElements
1962 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
1963 f_encDecTest_PersonInfo1();
1964 f_encDecTest_PersonInfo2();
1965 f_encDecTest_PersonInfo2_omitOptionals();
1969 //Passed, TR HL27452
1970 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
1971 f_encDecTest_PersonInfo2_defaultAttribute();
1975 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
1977 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1979 if(getverdict==pass) {
1981 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1982 f_encDecTest_PersonInfo1_defaultElement();
1987 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
1989 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
1991 if(getverdict==pass) {
1993 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
1994 f_encDecTest_PersonInfo4();
1998 //Passed, TR:HL28010
1999 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
2001 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
2003 if(getverdict==pass) {
2005 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
2010 //Passed, TR: HL28024
2011 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
2013 f_encDecTest_PersonInfo3();
2016 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
2018 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
2020 if(getverdict==pass) {
2022 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
2027 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
2028 f_encDecTest_PersonInfo5();
2032 testcase tc_substitutiongroup() runs on xmlTest_CT {
2034 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2036 if(getverdict==pass) {
2038 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2043 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2045 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2047 if(getverdict==pass) {
2049 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2054 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2056 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
2058 if(getverdict==pass) {
2060 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2061 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2066 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2068 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
2070 if(getverdict==pass) {
2072 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2073 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2078 testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {
2080 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2082 if(getverdict==pass) {
2084 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2085 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2090 testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {
2092 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2094 if(getverdict==pass) {
2096 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2097 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2102 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2104 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2106 if(getverdict==pass) {
2108 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2109 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2114 //Test if we find the substitutiongroup references in notargetnamespace
2115 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2117 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2122 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2124 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2128 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2130 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
2132 if(getverdict==pass) {
2134 "www_example_org_substitutiongroup_ref_e.ttcn",
2135 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2138 if(getverdict==pass) {
2140 "www_example_org_substitutiongroup_main_e.ttcn",
2141 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2146 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2148 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2150 if(getverdict==pass) {
2152 "www_example_org_substitutiongroup_rename_e.ttcn",
2153 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2158 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2160 f_encDecTest_ize_subs();
2163 testcase tc_type_substitution() runs on xmlTest_CT {
2165 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2167 if(getverdict==pass) {
2169 "www_example_org_type_substitution_e.ttcn",
2170 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2175 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2177 f_encDecTest_type_subs();
2181 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2183 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2185 if(getverdict==pass) {
2187 "www_example_org_type_substitution_chain_e.ttcn",
2188 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2193 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2195 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2197 if(getverdict==pass) {
2199 "www_example_org_type_substitution_abstract_block_e.ttcn",
2200 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2205 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2207 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2209 if(getverdict==pass) {
2211 "www_example_org_type_substitution_mod1_e.ttcn",
2212 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2215 if(getverdict==pass) {
2217 "www_example_org_type_substitution_mod2_e.ttcn",
2218 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2223 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2225 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2227 if(getverdict==pass) {
2229 "www_example_org_type_substitution_simpletype_e.ttcn",
2230 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2235 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2237 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2239 if(getverdict==pass) {
2241 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2242 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2247 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2249 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2251 if(getverdict==pass) {
2253 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2254 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2257 if(getverdict==pass) {
2259 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2260 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2265 testcase tc_only_element_substitution() runs on xmlTest_CT {
2267 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2269 if(getverdict==pass) {
2271 "www_example_org_only_element_substitution_e.ttcn",
2272 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2277 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2279 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2281 if(getverdict==pass) {
2283 "www_example_org_type_substitution_builtintype_e.ttcn",
2284 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2289 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2291 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2293 if(getverdict==pass) {
2295 "www_example_org_type_substitution_rename_e.ttcn",
2296 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2301 testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {
2303 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)
2305 if(getverdict==pass) {
2307 "www_example_org_type_substitution_complex_cascade_e.ttcn",
2308 "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2313 testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {
2315 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)
2317 if(getverdict==pass) {
2319 "www_example_org_type_substitution_simple_cascade_e.ttcn",
2320 "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2327 //========================================================
2328 // tc_element_nameInheritance_conv
2329 // Checks if name of named (aliased) type is not inherited
2330 //========================================================
2331 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2332 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2335 //========================================
2336 // tc_element_nameInheritance_encDec
2337 // Checks if name of named (aliased) type is not inherited
2338 //========================================
2340 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2341 f_encDecTest_nameInheritance();
2344 //========================================
2345 // tc_element_Tgc_encDec
2346 // Checks if name of named (aliased) type is not inherited
2347 //========================================
2349 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2353 testcase tc_element_abstract_conv() runs on xmlTest_CT {
2354 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
2357 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2358 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2360 if(getverdict==pass) {
2362 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2366 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2367 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2369 if(getverdict==pass) {
2371 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2375 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2376 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2378 if(getverdict==pass) {
2380 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2381 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2385 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2386 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2388 if(getverdict==pass) {
2390 "www_example_org_type_attributegroup_nillable_e.ttcn",
2391 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2395 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2396 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2398 if(getverdict==pass) {
2400 "www_example_org_attribgroup_ingroup_e.ttcn",
2401 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2405 //IndividualTrigger, nile="false"
2406 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2407 f_encDecTest_IndividualTrigger1();
2410 //IndividualTrigger, nil="true"
2411 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2412 f_encDecTest_IndividualTrigger2(); //empty record
2416 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2417 f_encDecTest_Isp1();
2421 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2422 f_encDecTest_Isp2();
2425 //RemarkNillable, nil="false"
2426 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2427 f_encDecTest_RemarkNillable1();
2430 //RemarkNillable, nil="true"
2431 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2432 f_encDecTest_RemarkNillable2();
2437 //=========================================================================
2439 //=========================================================================
2442 execute(tc_versionTest());//Passed
2443 execute(tc_xsd2ttcn_versionTest());//Passed
2445 execute(tc_firstTrial());//Passed
2446 execute(tc_secondTrial());//Passed
2447 execute(tc_empty()); //Passed, TR:
2448 //appended to increase coverage:
2450 execute(tc_annotation());
2451 execute(tc_annotation1());
2452 execute(tc_annotation2());
2453 execute(tc_xml_in_annotation());
2455 execute(tc_version());
2456 execute(tc_options_c());
2457 execute(tc_options_e());
2458 execute(tc_options_f());
2459 execute(tc_options_g());
2460 execute(tc_options_p());
2461 execute(tc_options_s());
2462 execute(tc_options_t());
2463 execute(tc_options_v());
2464 execute(tc_options_V());
2465 execute(tc_options_w());
2466 execute(tc_options_x());
2467 execute(tc_options_wrong());
2468 execute(tc_options_missing());
2469 //===LABEL and DEFINITION - unknown but used tags
2471 //===ttcn standard===
2472 execute(tc_XmlTest_all());//Passed
2473 execute(tc_element_in_all_neg());
2474 execute(tc_XmlTest_any_anyAttribute());//Passed
2475 execute(tc_XmlTest_HQ73011());//Passed
2476 execute(tc_anyattribute_optional());
2477 execute(tc_anyattribute_single());
2478 execute(tc_anyattribute_in_complex());
2479 execute(tc_XmlTest_attributeGroup());//Passed
2480 execute(tc_XmlTest_attribute_use_noTNS());//Passed
2481 execute(tc_id_attribute());
2482 execute(tc_attribute_order());
2483 execute(tc_name_conv_non_alphanumeric());
2484 execute(tc_module_name_convert_with_diff_namespace());
2485 execute(tc_module_typename_conversion());
2486 execute(tc_name_conv_remove_seq_of_low_line());
2487 execute(tc_name_conv_with_z());
2488 execute(tc_comment_placement());
2490 //===W3C standard===
2493 execute(tc_string()); //passed
2494 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2495 execute(tc_string_withEnum());//Passed, TR: HL26227
2496 execute(tc_string_withPosLength());//TR: HL21257,
2497 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2498 execute(tc_string_withNegativeLength());//Passed
2499 execute(tc_string_withFixedLength()); //Passed
2500 execute(tc_fixed_value());
2501 execute(tc_string_withFloatLength()); //passed ???
2502 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2503 execute(tc_string_withEmptyMin());//Passed
2504 execute(tc_string_withNegativeMin());//Passed
2505 execute(tc_string_withPosMax())//Passed
2506 execute(tc_string_withEmptyMax());//Passed
2507 execute(tc_string_withNegativeMax());//Passed
2508 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2509 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2510 execute(tc_string_withTypeAndBase());//Passed
2511 //TODO: put this test back later
2512 //execute(tc_string_pattern_square_brackets());
2514 execute(tc_boolean());//Passed
2515 execute(tc_boolean_variant_commented());
2517 execute(tc_decimal());//Passed
2518 //execute(tc_decimal_withLength()); length not supported
2519 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2520 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2521 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
2522 execute(tc_decimal_fractiondigits());
2524 execute(tc_integer());//Passed
2525 execute(tc_integer_empty1());//Passed
2526 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2527 execute(tc_integer_withMinIncl());//Passed
2528 execute(tc_integer_withMaxIncl());//Passed
2529 execute(tc_integer_withMinExcl());//Passed
2530 execute(tc_integer_withMaxExcl());//Passed
2532 execute(tc_time());//passed
2533 execute(tc_time_withEnum());//Passed TR HL22058
2535 execute(tc_list_conv()); //Passed
2536 execute(tc_list_encDec());//Passed
2537 execute(tc_integerList());//Passed
2538 execute(tc_list_simpletype());//Passed
2540 execute(tc_float_not_a_number());
2542 //===simpleType enum====
2543 execute(tc_simpleType_enum());//Passed
2544 execute(tc_simpleType_restrict_comp());
2545 execute(tc_simpleType_ref());
2546 execute(tc_simpleType_base());
2547 execute(tc_enum_field_names());
2548 execute(tc_attribute_enumeration_variant());
2550 execute(tc_union());//TR:HL23577
2551 execute(tc_union_optional());//CR_TR18883
2552 execute(tc_enumeration_union_restriction());
2553 execute(tc_enumeration_union_restriction2());
2554 execute(tc_enumeration_remove_dup());
2556 execute(tc_complex1()); //Passed
2557 execute(tc_complex2());//TR: HL24977
2558 execute(tc_complex_simpleContent());
2559 execute(tc_complex_namespaceas());
2560 execute(tc_complex_mixed_conv()); //Passed
2561 execute(tc_complex_group_reference());
2562 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
2563 execute(tc_complex_seq_embeds_seq());
2564 execute(tc_complex_choice_converter());//Passed
2565 execute(tc_complex_choice_encDec());//Passed
2567 execute(tc_complex_all_converter());//Passed
2568 execute(tc_complex_all_emptySet_encDec());//Passed
2569 execute(tc_complex_all_fullSet_encDec());//Passed
2570 execute(tc_complex_all_subSet_encDec());//Passed
2571 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2572 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2573 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2574 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2575 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2576 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2577 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2578 execute(tc_complex_extension_converter()); //TR HL32505
2579 execute(tc_complex_extension_encDec()); //Passed
2580 execute(tc_complex_extension_name_attrib_convert());
2581 execute(tc_complex_long_extension());
2582 execute(tc_type_name_conversion_follow());
2583 execute(tc_complex_extension_with_attrib());
2584 execute(tc_extension_restriction_with_attrib());
2585 execute(tc_attrib_enum());
2586 execute(tc_complex_self_recursion());
2587 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
2588 execute(tc_complex_restriction_with_use());
2589 execute(tc_complex_nillable());
2590 execute(tc_nillable_fixed());
2591 execute(tc_no_ns_connector());
2595 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
2600 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2601 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2602 execute(tc_complex_unique_converter());
2603 execute(tc_complex_include_converter());
2604 execute(tc_complex_include_neg1_converter());
2605 execute(tc_complex_import_pos1_converter());
2606 execute(tc_complex_import_pos2_converter());
2607 execute(tc_complex_import_neg1_converter());
2608 execute(tc_complex_import_withSL_converter());//SchemaLocation
2609 execute(tc_complex_import_withSL_encDec());
2610 execute(tc_complex_import_nameCollision_converter());
2611 execute(tc_complex_import_nameCollision2_converter());
2612 execute(tc_complex_any_pos_converter());
2613 execute(tc_imported_type_prefix());
2614 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2615 execute(tc_complex_any_pos2_encDec());
2616 execute(tc_complex_any_pos3_encDec());//failed, TR:
2618 execute(tc_element_anyType_converter());//Passed
2619 execute(tc_element_attrib_qualified());
2620 execute(tc_element_attrib_unqualified());
2621 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2622 execute(tc_element_anyType_attrOnly_encDec());//Passed
2623 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2624 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2625 execute(tc_element_anyType_encDec());//Passed, HL29711
2626 execute(tc_element_anyType_deeper_encDec());
2627 execute(tc_element_anyType_longer_encDec());
2628 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2629 execute(tc_element_recOfElements_encDec());//Passed
2630 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2631 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2632 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2633 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2634 execute(tc_element_recOfElements_anonymousType_conv());
2635 execute(tc_element_recOfElements_anonymousType_encDec());
2638 //===substitutiongroup===
2639 execute(tc_substitutiongroup());
2640 execute(tc_substitutiongroup_name_as());
2641 execute(tc_substitutiongroup_abstract_block_rest());
2642 execute(tc_substitutiongroup_abstract_block_ext());
2643 execute(tc_substitutiongroup_complex_without_element());
2644 execute(tc_substitutiongroup_long_extension());
2645 execute(tc_substitutiongroup_complextype_block());
2646 execute(tc_substitutiongroup_notargetnamespace());
2647 execute(tc_substitutiongroup_neg());
2648 execute(tc_substitutiongroup_diff_module());
2649 execute(tc_substitutiongroup_rename());
2650 execute(tc_substitutiongroup_endDec());
2652 //===type substitution===
2653 execute(tc_type_substitution());
2654 execute(tc_type_substitution_encDec());
2655 execute(tc_type_substitution_chain());
2656 execute(tc_type_substitution_abstract_block());
2657 execute(tc_type_substitution_diff_module());
2658 execute(tc_type_substitution_simpletype());
2659 execute(tc_type_substitution_with_elem_substitution());
2660 execute(tc_type_substitution_element_in_ct());
2661 execute(tc_only_element_substitution());
2662 execute(tc_type_substitution_builtintype());
2663 execute(tc_type_substitution_rename());
2664 execute(tc_type_substitution_complex_cascade());
2665 execute(tc_type_substitution_simple_cascade());
2669 execute(tc_element_nameInheritance_conv());
2670 execute(tc_element_nameInheritance_encDec());//TR HL49978
2671 execute(tc_element_Tgc_encDec());//TR HL49978
2672 execute(tc_element_abstract_conv()); //Not supported features
2673 execute(tc_element_nillable_converter());
2674 execute(tc_element_nillable_with_annotations());
2675 execute(tc_element_nillable_in_nillable_extension());
2676 execute(tc_element_attributegroup_nillable());
2677 execute(tc_element_attributegroup_ingroup());
2678 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2679 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2680 execute(tc_element_nillable_Isp_nilFalse_encDec());
2681 execute(tc_element_nillable_Isp_nilTrue_encDec());
2682 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2683 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2687 extension "version R1A02"; // a prerelease version
2688 extension "requiresTITAN R1C01";