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_without_namespace
1612 //=========================================================================
1613 //Positive test: The including schema includes a schema without a namespace
1614 testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
1615 f_shellCommandWithVerdict("xsd2ttcn including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);
1617 if(getverdict==pass) {
1619 "www_example_org_including_module_e.ttcn","www_example_org_including_module.ttcn", c_numOfDiff_headerAndModuleName);
1623 //=========================================================================
1624 // tc_complex_include_neg1_converter
1625 //=========================================================================
1626 //Negative test: The including and the included schema are not in the same namespace
1627 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1628 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1631 //=========================================================================
1632 // tc_complex_import_pos1_converter
1633 //=========================================================================
1634 //Positive test: The including and the included schema are in different namespaces (import and include)
1635 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1636 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1638 if(getverdict==pass) {
1640 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1643 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1647 //=========================================================================
1648 // tc_complex_import_pos2_converter
1649 //=========================================================================
1650 //Pos test: Checks if the converter can choose the file having the correct namespace
1651 //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
1652 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1653 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1655 if(getverdict==pass) {
1657 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1660 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1664 //=========================================================================
1665 // tc_complex_import_neg1_converter
1666 //=========================================================================
1667 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1668 //If the type checking is switched off the testcase fails.
1669 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1670 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1673 //=========================================================================
1674 // tc_complex_import_withSL_converter
1675 //=========================================================================
1676 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1677 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1678 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1680 if(getverdict==pass) {
1682 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1686 //=========================================================================
1687 // tc_complex_import_withSL_encDec
1688 //=========================================================================
1689 // TODO: fix HR88527
1690 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1691 var PurchaseReportImport pl_pdu:= {
1693 periodEnding :="1999-12-31",
1719 base:="Baby Monitor"
1724 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";
1725 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1726 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1729 //=========================================================================
1730 // tc_complex_import_nameCollision_converter
1731 //=========================================================================
1732 //imports the same type from different namespaces
1733 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1734 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1736 if(getverdict==pass) {
1738 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1740 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1742 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1746 //=========================================================================
1747 // tc_complex_import_nameCollision2_converter
1748 //=========================================================================
1749 //imports the same type from different namespaces
1750 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1751 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1754 //=========================================================================
1755 // tc_complex_any_pos_converter
1756 //=========================================================================
1757 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
1758 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
1760 if(getverdict==pass) {
1762 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1766 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1767 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1769 if(getverdict==pass) {
1771 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1776 //=========================================================================
1777 // tc_complex_any_pos1_encDec
1778 // Failed, TR: HL37887
1779 //=========================================================================
1780 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1782 var ElementContainingXhtml_1 vl_pdu := {
1783 firstField:="1st field",
1785 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1787 thirdField:="3rd field"
1789 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";
1790 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1793 //=========================================================================
1794 // tc_complex_any_pos2_encDec
1795 //=========================================================================
1796 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1798 var ElementContainingXhtml_2 vl_pdu := {
1800 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1803 var charstring vl_expectedEncodedPdu:=
1804 "<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";
1805 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1808 //=========================================================================
1809 // tc_complex_any_pos3_encDec
1810 // Failed, TR: HL37887
1811 //=========================================================================
1812 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1814 var ElementContainingXhtml_1 vl_pdu :=
1816 firstField := "1st field",
1818 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>",
1819 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1820 thirdField := "3rd field"
1823 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";
1824 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1829 //=========================================================================
1831 //=========================================================================
1835 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1837 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1839 if(getverdict==pass) {
1841 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1845 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1847 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1849 if(getverdict==pass) {
1851 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1855 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1857 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1859 if(getverdict==pass) {
1861 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1865 //Passed TR: Hl29679
1866 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1867 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
1868 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
1869 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1873 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1874 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
1875 var charstring vl_expectedEncodedPdu:=
1876 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
1877 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1880 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1881 var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1882 var charstring vl_expectedEncodedPdu:=
1883 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
1884 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1887 //Passed, TR: HL29711
1888 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1889 var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1890 var charstring vl_expectedEncodedPdu:=
1891 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1892 var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1893 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1896 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1897 var Anything1 vl_pdu:= {
1898 embed_values := omit,
1899 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1900 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1901 var charstring vl_expectedEncodedPdu:=
1902 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
1903 var Anything1 vl_expectedDecodedPdu:= {
1904 embed_values := omit,
1905 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1906 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1908 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1911 testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
1912 var Anything1 vl_pdu:= {
1913 embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
1914 attr :={"someattr=\"1\""},
1916 "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
1917 "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
1918 "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
1921 var charstring vl_expectedEncodedPdu:=
1922 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' someattr=\"1\">The ordered <ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a> has arrived <ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>Wait for further information.<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>Ok</ns31:anything1>\n";
1923 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1926 //===============================================================
1927 // tc_element_anyType_deeper_encDec
1928 //===============================================================
1929 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1930 var Anything1 vl_pdu:= {
1931 embed_values := omit,
1932 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1933 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>"} };
1935 var charstring vl_expectedEncodedPdu:=
1936 "<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";
1937 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1941 type record of charstring charstringList;
1943 //===============================================================
1944 // tc_element_anyType_longer_encDec
1945 //===============================================================
1946 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1947 var charstringList vl_elementList:= {
1948 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1949 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1950 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1951 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1953 var Anything1 vl_pdu:= {
1954 embed_values := omit,
1957 "nationality=\"HU\""
1962 var charstring vl_expectedEncodedPdu:=
1963 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";
1965 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1966 vl_pdu.elem_list[i]:=vl_elementList[i];
1967 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
1969 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"
1971 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1975 //===============================================================
1976 // tc_element_recOfElements_converter
1977 //===============================================================
1978 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
1979 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
1981 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1983 if(getverdict==pass) {
1985 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1989 //Passed, old name: tc_element_recOfElements
1990 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
1991 f_encDecTest_PersonInfo1();
1992 f_encDecTest_PersonInfo2();
1993 f_encDecTest_PersonInfo2_omitOptionals();
1997 //Passed, TR HL27452
1998 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
1999 f_encDecTest_PersonInfo2_defaultAttribute();
2003 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
2005 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
2007 if(getverdict==pass) {
2009 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
2010 f_encDecTest_PersonInfo1_defaultElement();
2015 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
2017 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
2019 if(getverdict==pass) {
2021 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
2022 f_encDecTest_PersonInfo4();
2026 //Passed, TR:HL28010
2027 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
2029 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
2031 if(getverdict==pass) {
2033 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
2038 //Passed, TR: HL28024
2039 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
2041 f_encDecTest_PersonInfo3();
2044 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
2046 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
2048 if(getverdict==pass) {
2050 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
2055 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
2056 f_encDecTest_PersonInfo5();
2060 testcase tc_substitutiongroup() runs on xmlTest_CT {
2062 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2064 if(getverdict==pass) {
2066 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2071 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2073 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2075 if(getverdict==pass) {
2077 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2082 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2084 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
2086 if(getverdict==pass) {
2088 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2089 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2094 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2096 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
2098 if(getverdict==pass) {
2100 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2101 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2106 testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {
2108 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2110 if(getverdict==pass) {
2112 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2113 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2118 testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {
2120 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
2122 if(getverdict==pass) {
2124 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2125 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2130 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2132 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2134 if(getverdict==pass) {
2136 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2137 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2142 //Test if we find the substitutiongroup references in notargetnamespace
2143 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2145 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2150 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2152 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2156 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2158 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
2160 if(getverdict==pass) {
2162 "www_example_org_substitutiongroup_ref_e.ttcn",
2163 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2166 if(getverdict==pass) {
2168 "www_example_org_substitutiongroup_main_e.ttcn",
2169 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2174 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2176 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2178 if(getverdict==pass) {
2180 "www_example_org_substitutiongroup_rename_e.ttcn",
2181 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2186 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2188 f_encDecTest_ize_subs();
2191 testcase tc_type_substitution() runs on xmlTest_CT {
2193 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2195 if(getverdict==pass) {
2197 "www_example_org_type_substitution_e.ttcn",
2198 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2203 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2205 f_encDecTest_type_subs();
2209 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2211 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2213 if(getverdict==pass) {
2215 "www_example_org_type_substitution_chain_e.ttcn",
2216 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2221 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2223 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2225 if(getverdict==pass) {
2227 "www_example_org_type_substitution_abstract_block_e.ttcn",
2228 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2233 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2235 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2237 if(getverdict==pass) {
2239 "www_example_org_type_substitution_mod1_e.ttcn",
2240 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2243 if(getverdict==pass) {
2245 "www_example_org_type_substitution_mod2_e.ttcn",
2246 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2251 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2253 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2255 if(getverdict==pass) {
2257 "www_example_org_type_substitution_simpletype_e.ttcn",
2258 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2263 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2265 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2267 if(getverdict==pass) {
2269 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2270 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2275 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2277 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2279 if(getverdict==pass) {
2281 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2282 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2285 if(getverdict==pass) {
2287 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2288 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2293 testcase tc_only_element_substitution() runs on xmlTest_CT {
2295 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2297 if(getverdict==pass) {
2299 "www_example_org_only_element_substitution_e.ttcn",
2300 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2305 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2307 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2309 if(getverdict==pass) {
2311 "www_example_org_type_substitution_builtintype_e.ttcn",
2312 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2317 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2319 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2321 if(getverdict==pass) {
2323 "www_example_org_type_substitution_rename_e.ttcn",
2324 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2329 testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {
2331 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)
2333 if(getverdict==pass) {
2335 "www_example_org_type_substitution_complex_cascade_e.ttcn",
2336 "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2341 testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {
2343 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)
2345 if(getverdict==pass) {
2347 "www_example_org_type_substitution_simple_cascade_e.ttcn",
2348 "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff_headerModNameAndNamespace);
2355 //========================================================
2356 // tc_element_nameInheritance_conv
2357 // Checks if name of named (aliased) type is not inherited
2358 //========================================================
2359 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2360 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2363 //========================================
2364 // tc_element_nameInheritance_encDec
2365 // Checks if name of named (aliased) type is not inherited
2366 //========================================
2368 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2369 f_encDecTest_nameInheritance();
2372 //========================================
2373 // tc_element_Tgc_encDec
2374 // Checks if name of named (aliased) type is not inherited
2375 //========================================
2377 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2381 testcase tc_element_abstract_conv() runs on xmlTest_CT {
2382 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
2385 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2386 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2388 if(getverdict==pass) {
2390 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2394 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2395 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2397 if(getverdict==pass) {
2399 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2403 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2404 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2406 if(getverdict==pass) {
2408 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2409 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2413 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2414 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2416 if(getverdict==pass) {
2418 "www_example_org_type_attributegroup_nillable_e.ttcn",
2419 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2423 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2424 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2426 if(getverdict==pass) {
2428 "www_example_org_attribgroup_ingroup_e.ttcn",
2429 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2433 //IndividualTrigger, nile="false"
2434 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2435 f_encDecTest_IndividualTrigger1();
2438 //IndividualTrigger, nil="true"
2439 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2440 f_encDecTest_IndividualTrigger2(); //empty record
2444 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2445 f_encDecTest_Isp1();
2449 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2450 f_encDecTest_Isp2();
2453 //RemarkNillable, nil="false"
2454 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2455 f_encDecTest_RemarkNillable1();
2458 //RemarkNillable, nil="true"
2459 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2460 f_encDecTest_RemarkNillable2();
2465 //=========================================================================
2467 //=========================================================================
2470 execute(tc_versionTest());//Passed
2471 execute(tc_xsd2ttcn_versionTest());//Passed
2473 execute(tc_firstTrial());//Passed
2474 execute(tc_secondTrial());//Passed
2475 execute(tc_empty()); //Passed, TR:
2476 //appended to increase coverage:
2478 execute(tc_annotation());
2479 execute(tc_annotation1());
2480 execute(tc_annotation2());
2481 execute(tc_xml_in_annotation());
2483 execute(tc_version());
2484 execute(tc_options_c());
2485 execute(tc_options_e());
2486 execute(tc_options_f());
2487 execute(tc_options_g());
2488 execute(tc_options_p());
2489 execute(tc_options_s());
2490 execute(tc_options_t());
2491 execute(tc_options_v());
2492 execute(tc_options_V());
2493 execute(tc_options_w());
2494 execute(tc_options_x());
2495 execute(tc_options_wrong());
2496 execute(tc_options_missing());
2497 //===LABEL and DEFINITION - unknown but used tags
2499 //===ttcn standard===
2500 execute(tc_XmlTest_all());//Passed
2501 execute(tc_element_in_all_neg());
2502 execute(tc_XmlTest_any_anyAttribute());//Passed
2503 execute(tc_XmlTest_HQ73011());//Passed
2504 execute(tc_anyattribute_optional());
2505 execute(tc_anyattribute_single());
2506 execute(tc_anyattribute_in_complex());
2507 execute(tc_XmlTest_attributeGroup());//Passed
2508 execute(tc_XmlTest_attribute_use_noTNS());//Passed
2509 execute(tc_id_attribute());
2510 execute(tc_attribute_order());
2511 execute(tc_name_conv_non_alphanumeric());
2512 execute(tc_module_name_convert_with_diff_namespace());
2513 execute(tc_module_typename_conversion());
2514 execute(tc_name_conv_remove_seq_of_low_line());
2515 execute(tc_name_conv_with_z());
2516 execute(tc_comment_placement());
2518 //===W3C standard===
2521 execute(tc_string()); //passed
2522 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2523 execute(tc_string_withEnum());//Passed, TR: HL26227
2524 execute(tc_string_withPosLength());//TR: HL21257,
2525 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2526 execute(tc_string_withNegativeLength());//Passed
2527 execute(tc_string_withFixedLength()); //Passed
2528 execute(tc_fixed_value());
2529 execute(tc_string_withFloatLength()); //passed ???
2530 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2531 execute(tc_string_withEmptyMin());//Passed
2532 execute(tc_string_withNegativeMin());//Passed
2533 execute(tc_string_withPosMax())//Passed
2534 execute(tc_string_withEmptyMax());//Passed
2535 execute(tc_string_withNegativeMax());//Passed
2536 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2537 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2538 execute(tc_string_withTypeAndBase());//Passed
2539 //TODO: put this test back later
2540 //execute(tc_string_pattern_square_brackets());
2542 execute(tc_boolean());//Passed
2543 execute(tc_boolean_variant_commented());
2545 execute(tc_decimal());//Passed
2546 //execute(tc_decimal_withLength()); length not supported
2547 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2548 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2549 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
2550 execute(tc_decimal_fractiondigits());
2552 execute(tc_integer());//Passed
2553 execute(tc_integer_empty1());//Passed
2554 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2555 execute(tc_integer_withMinIncl());//Passed
2556 execute(tc_integer_withMaxIncl());//Passed
2557 execute(tc_integer_withMinExcl());//Passed
2558 execute(tc_integer_withMaxExcl());//Passed
2560 execute(tc_time());//passed
2561 execute(tc_time_withEnum());//Passed TR HL22058
2563 execute(tc_list_conv()); //Passed
2564 execute(tc_list_encDec());//Passed
2565 execute(tc_integerList());//Passed
2566 execute(tc_list_simpletype());//Passed
2568 execute(tc_float_not_a_number());
2570 //===simpleType enum====
2571 execute(tc_simpleType_enum());//Passed
2572 execute(tc_simpleType_restrict_comp());
2573 execute(tc_simpleType_ref());
2574 execute(tc_simpleType_base());
2575 execute(tc_enum_field_names());
2576 execute(tc_attribute_enumeration_variant());
2578 execute(tc_union());//TR:HL23577
2579 execute(tc_union_optional());//CR_TR18883
2580 execute(tc_enumeration_union_restriction());
2581 execute(tc_enumeration_union_restriction2());
2582 execute(tc_enumeration_remove_dup());
2584 execute(tc_complex1()); //Passed
2585 execute(tc_complex2());//TR: HL24977
2586 execute(tc_complex_simpleContent());
2587 execute(tc_complex_namespaceas());
2588 execute(tc_complex_mixed_conv()); //Passed
2589 execute(tc_complex_group_reference());
2590 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
2591 execute(tc_complex_seq_embeds_seq());
2592 execute(tc_complex_choice_converter());//Passed
2593 execute(tc_complex_choice_encDec());//Passed
2595 execute(tc_complex_all_converter());//Passed
2596 execute(tc_complex_all_emptySet_encDec());//Passed
2597 execute(tc_complex_all_fullSet_encDec());//Passed
2598 execute(tc_complex_all_subSet_encDec());//Passed
2599 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2600 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2601 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2602 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2603 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2604 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2605 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2606 execute(tc_complex_extension_converter()); //TR HL32505
2607 execute(tc_complex_extension_encDec()); //Passed
2608 execute(tc_complex_extension_name_attrib_convert());
2609 execute(tc_complex_long_extension());
2610 execute(tc_type_name_conversion_follow());
2611 execute(tc_complex_extension_with_attrib());
2612 execute(tc_extension_restriction_with_attrib());
2613 execute(tc_attrib_enum());
2614 execute(tc_complex_self_recursion());
2615 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
2616 execute(tc_complex_restriction_with_use());
2617 execute(tc_complex_nillable());
2618 execute(tc_nillable_fixed());
2619 execute(tc_no_ns_connector());
2623 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
2628 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2629 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2630 execute(tc_complex_unique_converter());
2631 execute(tc_complex_include_converter());
2632 execute(tc_complex_include_neg1_converter());
2633 execute(tc_complex_include_without_namespace());
2634 execute(tc_complex_import_pos1_converter());
2635 execute(tc_complex_import_pos2_converter());
2636 execute(tc_complex_import_neg1_converter());
2637 execute(tc_complex_import_withSL_converter());//SchemaLocation
2638 execute(tc_complex_import_withSL_encDec());
2639 execute(tc_complex_import_nameCollision_converter());
2640 execute(tc_complex_import_nameCollision2_converter());
2641 execute(tc_complex_any_pos_converter());
2642 execute(tc_imported_type_prefix());
2643 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2644 execute(tc_complex_any_pos2_encDec());
2645 execute(tc_complex_any_pos3_encDec());//failed, TR:
2647 execute(tc_element_anyType_converter());//Passed
2648 execute(tc_element_attrib_qualified());
2649 execute(tc_element_attrib_unqualified());
2650 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2651 execute(tc_element_anyType_attrOnly_encDec());//Passed
2652 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2653 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2654 execute(tc_element_anyType_encDec());//Passed, HL29711
2655 execute(tc_element_anyType_embed_encDec());
2656 execute(tc_element_anyType_deeper_encDec());
2657 execute(tc_element_anyType_longer_encDec());
2658 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2659 execute(tc_element_recOfElements_encDec());//Passed
2660 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2661 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2662 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2663 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2664 execute(tc_element_recOfElements_anonymousType_conv());
2665 execute(tc_element_recOfElements_anonymousType_encDec());
2668 //===substitutiongroup===
2669 execute(tc_substitutiongroup());
2670 execute(tc_substitutiongroup_name_as());
2671 execute(tc_substitutiongroup_abstract_block_rest());
2672 execute(tc_substitutiongroup_abstract_block_ext());
2673 execute(tc_substitutiongroup_complex_without_element());
2674 execute(tc_substitutiongroup_long_extension());
2675 execute(tc_substitutiongroup_complextype_block());
2676 execute(tc_substitutiongroup_notargetnamespace());
2677 execute(tc_substitutiongroup_neg());
2678 execute(tc_substitutiongroup_diff_module());
2679 execute(tc_substitutiongroup_rename());
2680 execute(tc_substitutiongroup_endDec());
2682 //===type substitution===
2683 execute(tc_type_substitution());
2684 execute(tc_type_substitution_encDec());
2685 execute(tc_type_substitution_chain());
2686 execute(tc_type_substitution_abstract_block());
2687 execute(tc_type_substitution_diff_module());
2688 execute(tc_type_substitution_simpletype());
2689 execute(tc_type_substitution_with_elem_substitution());
2690 execute(tc_type_substitution_element_in_ct());
2691 execute(tc_only_element_substitution());
2692 execute(tc_type_substitution_builtintype());
2693 execute(tc_type_substitution_rename());
2694 execute(tc_type_substitution_complex_cascade());
2695 execute(tc_type_substitution_simple_cascade());
2699 execute(tc_element_nameInheritance_conv());
2700 execute(tc_element_nameInheritance_encDec());//TR HL49978
2701 execute(tc_element_Tgc_encDec());//TR HL49978
2702 execute(tc_element_abstract_conv()); //Not supported features
2703 execute(tc_element_nillable_converter());
2704 execute(tc_element_nillable_with_annotations());
2705 execute(tc_element_nillable_in_nillable_extension());
2706 execute(tc_element_attributegroup_nillable());
2707 execute(tc_element_attributegroup_ingroup());
2708 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2709 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2710 execute(tc_element_nillable_Isp_nilFalse_encDec());
2711 execute(tc_element_nillable_Isp_nilTrue_encDec());
2712 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2713 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2717 extension "version R1A02"; // a prerelease version
2718 extension "requiresTITAN R1C01";