Sync with 5.4.1
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / src / xmlTest_Testcases.ttcn
CommitLineData
970ed795 1/******************************************************************************
3abe9331 2 * Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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 ******************************************************************************/
8
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
17
18module xmlTest_Testcases
19{
20
21//=========================================================================
22// Import Part
23//=========================================================================
24//import from XSD all;
25import from PIPEasp_Types all;
26import from PIPEasp_PortType all;
27import from PIPEasp_Templates all;
28import from xmlTest_Shell all;
29
30import from www_XmlTest_org_element_anyType_e all;
31import from www_XmlTest_org_complex_all_e all;
32import from www_XmlTest_org_complex_extension_e all;
33import from www_XmlTest_org_complex_restriction_e all;
34import from www_XmlTest_org_complex_import_e all;
35import from www_XmlTest_org_complex_any_e all;
36
37import from xmlTest_Functions_string all;
38import from xmlTest_Functions_complex1 all;
39import from xmlTest_Functions_complex2 all;
40import from xmlTest_Functions_complex all;
41import from xmlTest_Functions_element all;
42import from xmlTest_Functions_list all;
43
44
45//=========================================================================
46// Module Parameters
47//=========================================================================
48
49// Insert module parameters here if applicable!
50// You can use the module_param skeleton!
51
52//=========================================================================
53// Data Types
54//=========================================================================
55
56// Insert data type defintions here if applicable!
57// You can use the data_type skeleton!
58
59//=========================================================================
60// Signatures
61//=========================================================================
62
63// Insert signature definitions here if applicable!
64// You can use the signature skeleton!
65
66//=========================================================================
67//Port Types
68//=========================================================================
69
70// Insert port type defintions here if applicable!
71// You can use the port_type skeleton!
72
73//=========================================================================
74//Component Types
75//=========================================================================
76
77type component xmlTest_CT extends Shell_CT {}
78
79type component mtc_CT {}
80//=========================================================================
81// Constants
82//=========================================================================
83
84
85//=========================================================================
86// Templates
87//=========================================================================
88
89// Insert templates here if applicable!
90// You can use the template skeleton!
91
92//=========================================================================
93// Altsteps
94//=========================================================================
95
96// Insert altsteps here if applicable!
97// You can use the altstep skeleton!
98
99//=========================================================================
100// Functions
101//=========================================================================
102
103//=========================================================================
104// f_countDelimiters
105//=========================================================================
106function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) {
107 pl_counter:=0;
108 var integer pos:=0;
109 var integer vl_size:=lengthof(pl_string);
110 var integer vl_delimsize:=lengthof(pl_delimiter);
111 while(pos<vl_size) {
112 if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1}
113 pos:=pos+1;
114 }
115}//f_
116
117//=========================================================================
118// f_compareFiles
119//=========================================================================
120//pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference
121function 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);
126
127 if(v_ASP_PResult.code==0)
128 {
129 setverdict(pass);
130 }
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) {
136 setverdict(fail);
137 }
138 } else { //e.g 512: No such file or directory
139 log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult)
140 setverdict(fail);
141 }
142}//f_
143
144
145//=========================================================================
146// Testcases
147//=========================================================================
148testcase tc_versionTest() runs on xmlTest_CT
149{
150 f_shellCommandWithVerdict("compiler -v","",0)
151}
152
153testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
154{
155 f_shellCommandWithVerdict("xsd2ttcn -v","",0)
156}
157
158//simple records
159testcase tc_firstTrial() runs on xmlTest_CT
160{
3abe9331 161 f_shellCommandWithVerdict("xsd2ttcn elements.xsd","",c_shell_successWithoutWarningAndError)
970ed795
EL
162}
163
164// see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema
165// This tc is "passed" but it is generated into noTargetNaespace.ttcn
166testcase tc_secondTrial() runs on xmlTest_CT
167{
168 f_shellCommandWithVerdict("xsd2ttcn po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError)
169}
170testcase tc_empty() runs on xmlTest_CT
171{
172 f_shellCommandWithVerdict("xsd2ttcn empty.xsd","",c_shell_successWithoutWarningAndError);
173
174 if(getverdict==pass) {
175 f_compareFiles(
176 "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName);
177 }
178}
179
180testcase tc_annotation() runs on xmlTest_CT
181{
3abe9331 182 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation.xsd","",c_shell_successWithWarning);
970ed795
EL
183 if(getverdict==pass) {
184 f_compareFiles(
185 "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
186 }
187}
188
189testcase tc_annotation1() runs on xmlTest_CT
190{
191 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
192}
193
194testcase tc_annotation2() runs on xmlTest_CT
195{
196 f_shellCommandWithVerdict("xsd2ttcn XmlTest_annotation2.xsd","",c_shell_error);
197}
198
3abe9331 199testcase tc_xml_in_annotation() runs on xmlTest_CT
200{
201 f_shellCommandWithVerdict("xsd2ttcn xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
202 if(getverdict==pass) {
203 f_compareFiles(
204 "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
205 }
206}
207
970ed795
EL
208//Incorrect version: 1.1
209testcase tc_version() runs on xmlTest_CT
210{
211 f_shellCommandWithVerdict("xsd2ttcn XmlTest_version.xsd","",c_shell_successWithWarning);
212}
213
214//************************************
215// === Converter switch tests: ===
216//************************************
217// usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ...
218// or xsd2ttcn -v
219//
220// OPTIONS:
221// -c: disable the generation of comments in TTCN-3 modules
222// -e: disable the generation of encoding instructions in TTCN-3 modules
223// -f file: the XSD files are taken from file instead of the command line
224// -p: do not generate the UsefulTtcn3Types and XSD predefined modules
225// -q: quiet - disable the issue of status messages
226// -s: parse and validate only - no TTCN-3 module generation
227// -t: disable the generation of timing information in TTCN-3 modules
228// -v: show version information
229// -w: suppress warnings
230// -x: disable schema validation but generate TTCN-3 modules
231
232//TODO:Not ready yet
233testcase tc_options_c() runs on xmlTest_CT
234{
3abe9331 235 f_shellCommandWithVerdict("xsd2ttcn -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
970ed795
EL
236 if(getverdict==pass) {
237 f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
238 }
239}
240
241// -e: disable the generation of encoding instructions in TTCN-3 modules
242testcase tc_options_e() runs on xmlTest_CT
243{
3abe9331 244 f_shellCommandWithVerdict("xsd2ttcn -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
970ed795
EL
245 if(getverdict==pass) {
246 f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
247 }
248}
249
250// -f file: the XSD files are taken from file instead of the command line
251testcase tc_options_f() runs on xmlTest_CT
252{
3abe9331 253 f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithWarning );
970ed795
EL
254 if(getverdict==pass) {
255 f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
256 }
257}
258
3abe9331 259testcase tc_options_g() runs on xmlTest_CT
260{
261 f_shellCommandWithVerdict("xsd2ttcn -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
262 if(getverdict==pass) {
263 f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
264 "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
265 }
266
267 f_shellCommandWithVerdict("xsd2ttcn generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
268 if(getverdict==pass) {
269 f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
270 "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
271 }
272}
273
970ed795
EL
274//TODO: more filename in XmlTest_files2.txt
275// testcase tc_options_f() runs on xmlTest_CT
276// {
277// f_shellCommandWithVerdict("xsd2ttcn -f XmlTest_files1.txt","",c_shell_successWithoutWarningAndError );
278// if(getverdict==pass) {
279// f_compareFiles("www_XmlTest_org_annotation_e.ttcn)","www_XmlTest_org_annotation.ttcn)", c_numOfDiff_headerModNameAndNamespace);
280// }
281// }
282
283//-p: do not generate the UsefulTtcn3Types and XSD predefined modules
284testcase tc_options_p() runs on xmlTest_CT
285{
286 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
287 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
288 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
289
3abe9331 290 f_shellCommandWithVerdict("xsd2ttcn -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
970ed795
EL
291 if(getverdict==pass) {
292 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError);
293 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
294 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
295 }
296
297 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
298 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
299 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
300}
301
302//-s: parse and validate only - no TTCN-3 module generation
303testcase tc_options_s() runs on xmlTest_CT
304{
305 f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
306 f_shellCommandWithVerdict("mv XSD.ttcn tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
307 f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
308
309 f_shellCommandWithVerdict("xsd2ttcn -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
310 //TODO:test if wrong xsd causes conversion error wit this switch
311
312 //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist:
313 if(getverdict==pass) {
314 f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory );
315 f_shellCommandWithVerdict("ls XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
316 f_shellCommandWithVerdict("ls UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
317 }
318 f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
319 f_shellCommandWithVerdict("mv tmp_XSD.ttcn XSD.ttcn","",c_shell_successWithoutWarningAndError );
320 f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
321}
322
323//Ready
324// -t: disable the generation of timing information in TTCN-3 modules
325testcase tc_options_t() runs on xmlTest_CT
326{
3abe9331 327 f_shellCommandWithVerdict("xsd2ttcn -t XmlTest_annotation.xsd","",c_shell_successWithWarning );
970ed795
EL
328 if(getverdict==pass) {
329 f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
330 }
331}
332
333// -v: show version information
334//TODO:Not ready yet
335testcase tc_options_v() runs on xmlTest_CT
336{
337 f_shellCommandWithVerdict("xsd2ttcn -v","",c_shell_successWithoutWarningAndError );
338}
339
340//TODO:Not ready yet
341// -q: quiet - disable the issue of status messages
342testcase tc_options_V() runs on xmlTest_CT
343{
3abe9331 344 f_shellCommandWithVerdict("xsd2ttcn -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
970ed795
EL
345}
346
347//TODO:Not ready yet
348// -w: suppress warnings
349testcase tc_options_w() runs on xmlTest_CT
350{
351 f_shellCommandWithVerdict("xsd2ttcn -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
352}
353
354//TODO:Not ready yet
355// -x: disable schema validation but generate TTCN-3 modules
356testcase tc_options_x() runs on xmlTest_CT
357{
3abe9331 358 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
970ed795
EL
359}
360
361testcase tc_options_wrong() runs on xmlTest_CT
362{
363 f_shellCommandWithVerdict("xsd2ttcn -H XmlTest_annotation.xsd","", c_shell_error);
364}
365
366testcase tc_options_missing() runs on xmlTest_CT
367{
368 f_shellCommandWithVerdict("xsd2ttcn ","",c_shell_successWithoutWarningAndError );
369 //TODO: check the output
370}
371
372
373testcase tc_XmlTest_label() runs on xmlTest_CT
374{
375 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
376}
377
378testcase tc_XmlTest_definition() runs on xmlTest_CT
379{
380 f_shellCommandWithVerdict("xsd2ttcn -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
381}
382//************************************
383// Testcases_basedOnTtcnStandard9
384//************************************
385group Testcases_basedOnTtcnStandard9 {
386
387 //Passed
388 testcase tc_XmlTest_all() runs on xmlTest_CT
389 {
390 f_shellCommandWithVerdict("xsd2ttcn all.xsd","",c_shell_successWithoutWarningAndError);
3abe9331 391 if(getverdict==pass) {
392 f_compareFiles(
393 "www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName);
394 }
395 }
396
397 testcase tc_element_in_all_neg() runs on xmlTest_CT
398 {
399 f_shellCommandWithVerdict("xsd2ttcn element_in_all_minmax.xsd","",c_shell_error);
970ed795
EL
400 }
401
402 //Passed
403 testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
404 {
3abe9331 405 f_shellCommandWithVerdict("xsd2ttcn any_anyAttribute.xsd","",c_shell_successWithWarning);
970ed795
EL
406 }
407
408 //HQ73011
409 //Heading: XSD anyAtribute is inserted into a wrong place
410 //Passed
411 testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
412 {
413 f_shellCommandWithVerdict("xsd2ttcn HQ73011.xsd","",c_shell_successWithoutWarningAndError);
414 if(getverdict==pass) {
415 f_compareFiles(
416 "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName);
417 }
418 }
419
3abe9331 420 testcase tc_anyattribute_optional() runs on xmlTest_CT
421 {
422 f_shellCommandWithVerdict("xsd2ttcn anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
423 if(getverdict==pass) {
424 f_compareFiles(
425 "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
426 }
427 }
428
429 testcase tc_anyattribute_single() runs on xmlTest_CT
430 {
431 f_shellCommandWithVerdict("xsd2ttcn anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
432 if(getverdict==pass) {
433 f_compareFiles(
434 "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName);
435 }
436 }
437
438 testcase tc_anyattribute_in_complex() runs on xmlTest_CT
439 {
440 f_shellCommandWithVerdict("xsd2ttcn anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
441 if(getverdict==pass) {
442 f_compareFiles(
443 "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace);
444 }
445 }
446
447
970ed795
EL
448 //Passed
449 testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
450 {
451 f_shellCommandWithVerdict("xsd2ttcn attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
452 }
453
454 //double schema definition - Validator Returns with Error, Passed
455 testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
456 {
457 f_shellCommandWithVerdict("xsd2ttcn attribute_use_noTNS.xsd","",c_shell_error);
458 }
459
3abe9331 460 testcase tc_id_attribute() runs on xmlTest_CT
461 {
462 f_shellCommandWithVerdict("xsd2ttcn id_attrib.xsd","",c_shell_successWithWarning);
463 if(getverdict==pass) {
464 f_compareFiles(
465 "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName);
466 }
467 }
468
469 testcase tc_attribute_order() runs on xmlTest_CT
470 {
471 f_shellCommandWithVerdict("xsd2ttcn attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
472 if(getverdict==pass) {
473 f_compareFiles(
474 "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName);
475 }
476
477 if(getverdict==pass) {
478 f_compareFiles(
479 "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName);
480 }
481 }
482
483 testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
484 {
485 f_shellCommandWithVerdict("xsd2ttcn name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
486 if(getverdict==pass) {
487 f_compareFiles(
488 "http_www_example_org_name_conv2_e.ttcn",
489 "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName);
490 }
491 }
492
493 testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
494 f_shellCommandWithVerdict("xsd2ttcn imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
495
496 if(getverdict==pass) {
497 f_compareFiles(
498 "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName);
499 }
500
501 if(getverdict==pass) {
502 f_compareFiles(
503 "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName);
504 }
505 }//tc_
506
507 testcase tc_module_typename_conversion() runs on xmlTest_CT {
508 f_shellCommandWithVerdict("xsd2ttcn module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
509
510 if(getverdict==pass) {
511 f_compareFiles(
512 "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName);
513 }
514
515 if(getverdict==pass) {
516 f_compareFiles(
517 "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName);
518 }
519 }//tc_
520
521 testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
522 {
523 f_shellCommandWithVerdict("xsd2ttcn name_conv_remove_seq_of_low_line.xsd","",
524 c_shell_successWithoutWarningAndError);
525 if(getverdict==pass) {
526 f_compareFiles(
527 "http_www_example_org_name_conv3_e.ttcn",
528 "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName);
529 }
530 }
531
532 testcase tc_name_conv_with_z() runs on xmlTest_CT
533 {
534 f_shellCommandWithVerdict("xsd2ttcn -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
535 if(getverdict==pass) {
536 f_compareFiles(
537 "www_example_org_name_conv_http_e.ttcn",
538 "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName);
539 }
540 }
541
542 testcase tc_comment_placement() runs on xmlTest_CT
543 {
544 f_shellCommandWithVerdict("xsd2ttcn comment_placement.xsd","",c_shell_successWithoutWarningAndError);
545 if(getverdict==pass) {
546 f_compareFiles(
547 "www_example_org_comment_placement_e.ttcn",
548 "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName);
549 }
550 }
551
970ed795
EL
552}//group
553
554//************************************
555// Testcases based on W3C standards
556//************************************
557
558//******************************
559// StringTest
560//******************************
561group StringTest {
562
563 //=== Correct string type definitions: ====
564 //TR HL21086 - whitespace preserve. TODO: standalone testcase
565 testcase tc_string() runs on xmlTest_CT
566 {
567 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
568 if(getverdict==pass) {
569 f_compareFiles(
570 "www_XmlTest_org_string.ttcn",
571 "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace);
572 }
573////////////////////////////////////////////
574//
575// f_encDecTest_NameA();
576// f_encDecTest_NameB();
577// f_encDecTest_Non_empty_string();
578// f_encDecTest_Type();
579//
580////////////////////////////////////////////
581 }
582
583 //Passed, TR: Hl21086 - Solved
584 testcase tc_string_withWhitespace() runs on xmlTest_CT
585 {
586 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
587 if(getverdict==pass) {
588 f_compareFiles(
589 "www_XmlTest_org_string_withWhitespace.ttcn",
590 "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName);
591 }
592 f_encDecTest_StringWhiteSpaceP();
593 f_encDecTest_StringWhiteSpaceR();
594 f_encDecTest_StringWhiteSpaceC();
595 }
596
597 //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!!
598 testcase tc_string_withEnum() runs on xmlTest_CT
599 {
600 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
601 if(getverdict==pass) {
602 f_compareFiles(
603 "www_XmlTest_org_string_withEnum.ttcn",
604 "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName);
605 }
606 f_encDecTest_StringEnum();
607 }
608 //TODO: Write length of child restriction tests based on tc_string!!!
609
610 //=== Length restriction tests ===
611
612
613
614 //=== Faulty String definitions: =========
615
616 //===length===
617 //TR: HL21257 --Solved
618 testcase tc_string_withPosLength() runs on xmlTest_CT
619 {
620 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
621 if(getverdict==pass) {
622 f_compareFiles(
623 "www_XmlTest_org_string_withPosLength.ttcn",
624 "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName);
625 }
626 }
627
628 //Passed, returs with error
629 testcase tc_string_withEmptyLength() runs on xmlTest_CT
630 {
631 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyLength.xsd","",c_shell_error)
632 }
633
634 testcase tc_string_withNegativeLength() runs on xmlTest_CT
635 {
636 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeLength.xsd","",c_shell_error)
637 }
638
639 //Passed
640 testcase tc_string_withFixedLength() runs on xmlTest_CT
641 {
3abe9331 642 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFixedLength.xsd","",c_shell_error);
643 }
644
645 testcase tc_fixed_value() runs on xmlTest_CT
646 {
647 f_shellCommandWithVerdict("xsd2ttcn fixed_value.xsd","",c_shell_successWithWarning);
648 if(getverdict==pass) {
649 f_compareFiles(
650 "www_example_org_fixed_value.ttcn",
651 "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName);
652 }
970ed795
EL
653 }
654
655 //Passed
656 testcase tc_string_withFloatLength() runs on xmlTest_CT
657 {
658 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFloatLength.xsd","", c_shell_error)
659 }
660
661 //===minLength===
662 //Passed, TR: HL21690
663 testcase tc_string_withPosMinLength() runs on xmlTest_CT
664 {
665 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
666 if(getverdict==pass) {
667 f_compareFiles(
668 "www_XmlTest_org_string_withMinLength.ttcn",
669 "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName);
670 }
671 }
672
673 //Passed
674 testcase tc_string_withEmptyMin() runs on xmlTest_CT
675 {
676 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMin.xsd","",c_shell_error)
677 }
678
679 //Passed
680 testcase tc_string_withNegativeMin() runs on xmlTest_CT
681 {
682 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMin.xsd","",c_shell_error)
683 }
684
685 //===maxLength===
686 //Passed
687 testcase tc_string_withPosMax() runs on xmlTest_CT
688 {
689 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
690 if(getverdict==pass) {
691 f_compareFiles(
692 "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName);
693 }
694 }
695
696 //Passed
697 testcase tc_string_withEmptyMax() runs on xmlTest_CT
698 {
699 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withEmptyMax.xsd","",c_shell_error)
700 }
701
702 //Passed
703 testcase tc_string_withNegativeMax() runs on xmlTest_CT
704 {
705 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withNegativeMax.xsd","",c_shell_error)
706 }
707 //=== minLength>maxLength
708 //Passed, TR:
709 testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
710 {
711 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
712 }
713 //Passed
714 testcase tc_string_withOverDefinition() runs on xmlTest_CT
715 {
716 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withOverDefinition.xsd","",c_shell_error)
717 }
718
719 testcase tc_string_withTypeAndBase() runs on xmlTest_CT
720 {
721 f_shellCommandWithVerdict("xsd2ttcn XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
722 }
3abe9331 723
724 //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
725 //{
726 // f_shellCommandWithVerdict("xsd2ttcn regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
727 // if(getverdict==pass) {
728 // f_compareFiles(
729 // "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName);
730 // }
731 //}
970ed795
EL
732}//StringTest
733
734//******************************
735// BooleanTest
736//******************************
737group BooleanTest {
738
739 //TODO: check warning sending for not supported:features
740 testcase tc_boolean() runs on xmlTest_CT {
741 f_shellCommandWithVerdict("xsd2ttcn XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
742 if(getverdict==pass) {
743 f_compareFiles(
744 "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName);
745 }
746 }
3abe9331 747
748 testcase tc_boolean_variant_commented() runs on xmlTest_CT {
749 f_shellCommandWithVerdict("xsd2ttcn boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
750 if(getverdict==pass) {
751 f_compareFiles(
752 "www_example_org_boolean_variant_commented_e.ttcn",
753 "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName);
754 }
755 }
970ed795
EL
756}//BooleanTest
757
758
759//******************************
760// DecimalTest
761//******************************
762group DecimalTest {
763
764 //Passed
765 testcase tc_decimal() runs on xmlTest_CT {
766 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
767 if(getverdict==pass) {
768 f_compareFiles(
769 "www_XmlTest_org_decimal_e.ttcn",
770 "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName);
771 }
772 }
773
774 //!!!!!Length not supported!!!!
775 // testcase tc_decimal_withLength() runs on xmlTest_CT {
776 // f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
777 // if(getverdict==pass) {
778 // f_compareFiles(
779 // "www_XmlTest_org_decimal_withLength_e.ttcn",
780 // "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName);
781 // }
782 // }
783
784 //TR: Generates integer limits instead of decimal
785 //TR: HL2715 -Solved
786 testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
787 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
788
789 if(getverdict==pass) {
790 f_compareFiles(
791 "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
792 "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName);
793 }
794 }//tc_
795
796 //TR21266 -Solved
797 testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
798 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
799
800 if(getverdict==pass) {
801 f_compareFiles(
802 "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
803 "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName);
804 }
805 }//tc_
806
807 //TR HL21296
808 testcase tc_decimal_withEnum() runs on xmlTest_CT {
809 f_shellCommandWithVerdict("xsd2ttcn XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
810
811 if(getverdict==pass) {
812 f_compareFiles(
813 "www_XmlTest_org_decimal_withEnum_e.ttcn",
814 "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
815 }
816 }
3abe9331 817
818 testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
819 f_shellCommandWithVerdict("xsd2ttcn decimal_fractiondigits.xsd","",c_shell_successWithWarning)
820
821 if(getverdict==pass) {
822 f_compareFiles(
823 "www_example_org_decimal_fractiondigits_e.ttcn",
824 "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName);
825 }
826 }
970ed795
EL
827}//DecimalTest
828
829//******************************
830// IntegerTest
831// Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1
832//******************************
833group IntegerTest {
834
835 testcase tc_integer() runs on xmlTest_CT {
836 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
837
838 if(getverdict==pass) {
839 f_compareFiles(
840 "www_XmlTest_org_integer_e.ttcn",
841 "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName);
842 }
843
844 }//tc_
845
846 //negative test
847 testcase tc_integer_empty1() runs on xmlTest_CT {
848 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_empty1.xsd","",c_shell_error)
849 }//tc_
850
851 //negative test
852 testcase tc_integer_withLength() runs on xmlTest_CT {
853 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withLength.xsd","",c_shell_error)
854 }//tc_
855
856 //Ready, passed, TR:HL21694 -solved
857 testcase tc_integer_withEnum() runs on xmlTest_CT {
858 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
859
860 if(getverdict==pass) {
861 f_compareFiles(
862 "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
863 }
864 }//tc_
865
866 //Passed
867 testcase tc_integer_withMinIncl() runs on xmlTest_CT {
868 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
869
870 if(getverdict==pass) {
871 f_compareFiles(
872 "www_XmlTest_org_integer_withMinIncl_e.ttcn",
873 "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName);
874 }
875 }//tc_
876
877 //Passed
878 testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
879 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
880
881 if(getverdict==pass) {
882 f_compareFiles(
883 "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName);
884 }
885 }//tc_
886
887 //Passed
888 testcase tc_integer_withMinExcl() runs on xmlTest_CT {
889 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
890
891 if(getverdict==pass) {
892 f_compareFiles(
893 "www_XmlTest_org_integer_withMinExcl_e.ttcn",
894 "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName);
895 }
896 }//tc_
897
898 //Passed
899 testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
900 f_shellCommandWithVerdict("xsd2ttcn XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
901
902 if(getverdict==pass) {
903 f_compareFiles(
904 "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName);
905 }
906 }//tc_
907
908
909}//IntegerTest
910
3abe9331 911
912 testcase tc_float_not_a_number() runs on xmlTest_CT {
913 f_shellCommandWithVerdict("xsd2ttcn not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
914
915 if(getverdict==pass) {
916 f_compareFiles(
917 "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
918 "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName);
919 }
920 }//tc_
921
970ed795
EL
922 //
923 testcase tc_simpleType_enum() runs on xmlTest_CT {
924
925 f_shellCommandWithVerdict("xsd2ttcn XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
926
927 if(getverdict==pass) {
928 f_compareFiles(
929 "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName);
930 }
931
932 }//tc_
933
3abe9331 934 testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {
935
936 f_shellCommandWithVerdict("xsd2ttcn simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
937
938 if(getverdict==pass) {
939 f_compareFiles(
940 "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName);
941 }
942
943 }//tc_
944
945 testcase tc_simpleType_ref() runs on xmlTest_CT {
946
947 f_shellCommandWithVerdict("xsd2ttcn simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
948
949 if(getverdict==pass) {
950 f_compareFiles(
951 "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName);
952 }
953
954 }//tc_
955
956 testcase tc_simpleType_base() runs on xmlTest_CT {
957
958 f_shellCommandWithVerdict("xsd2ttcn simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
959
960 if(getverdict==pass) {
961 f_compareFiles(
962 "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName);
963 }
964
965 }//tc_
966
967 //
968 testcase tc_enum_field_names() runs on xmlTest_CT {
969
970 f_shellCommandWithVerdict("xsd2ttcn enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
971
972 if(getverdict==pass) {
973 f_compareFiles(
974 "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName);
975 }
976
977 }//tc_
978
970ed795
EL
979
980//******************************
981// TimeTest
982// Based on (XSD_2)/
983//******************************
984group TimeTest {
985
986 //Passed:
987 testcase tc_time() runs on xmlTest_CT {
988 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
989
990 if(getverdict==pass) {
991 f_compareFiles(
992 "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName);
993 }
994 }//tc_
995
996 //Passed TR HL22058
997 testcase tc_time_withEnum() runs on xmlTest_CT {
998 f_shellCommandWithVerdict("xsd2ttcn XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
999
1000 if(getverdict==pass) {
1001 f_compareFiles(
1002 "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
1003 }
1004 }//tc_
1005}//TimeTest
1006
1007group ListTest {
1008 //converter
1009 testcase tc_list_conv() runs on xmlTest_CT {
1010
1011 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
1012
1013 if(getverdict==pass) {
1014 f_compareFiles(
1015 "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName);
1016 }
1017
1018 // restrictions:length, minLength, maxLength, pattern, and enumeration.
1019 }//tc_
1020
1021 testcase tc_list_encDec() runs on xmlTest_CT {
1022 f_encDecTest_StringList();
1023 }//tc_
1024
1025 testcase tc_integerList() runs on xmlTest_CT {
1026
1027 f_shellCommandWithVerdict("xsd2ttcn XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
1028
1029 if(getverdict==pass) {
1030 f_compareFiles(
1031 "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName);
1032 }
1033
1034 }//tc_
3abe9331 1035
1036 testcase tc_list_simpletype() runs on xmlTest_CT {
1037
1038 f_shellCommandWithVerdict("xsd2ttcn list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
1039
1040 if(getverdict==pass) {
1041 f_compareFiles(
1042 "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName);
1043 }
1044
1045 }//tc_
970ed795
EL
1046}//ListTest
1047
1048group UnionTest {
1049 //TR:HL23577
1050 testcase tc_union() runs on xmlTest_CT {
1051
1052 f_shellCommandWithVerdict("xsd2ttcn XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
1053
1054 if(getverdict==pass) {
1055 f_compareFiles(
1056 "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
1057 }
1058 }//tc_
1059
1060 testcase tc_union_optional() runs on xmlTest_CT {
1061
1062 f_shellCommandWithVerdict("xsd2ttcn ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
1063
1064 if(getverdict==pass) {
1065 f_compareFiles(
1066 "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
1067 }
1068 }
1069
3abe9331 1070 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {
1071
1072 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction.xsd","",c_shell_successWithWarning)
1073
1074 if(getverdict==pass) {
1075 f_compareFiles(
1076 "www_example_org_enumeration_restriction_e.ttcn",
1077 "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1078 }
1079 }
1080
1081 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {
1082
1083 f_shellCommandWithVerdict("xsd2ttcn enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
1084
1085 if(getverdict==pass) {
1086 f_compareFiles(
1087 "www_example_org_seq_enumeration_restriction_e.ttcn",
1088 "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1089 }
1090 }
1091
1092 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {
1093
1094 f_shellCommandWithVerdict("xsd2ttcn enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
1095
1096 if(getverdict==pass) {
1097 f_compareFiles(
1098 "www_example_org_enumeration_remove_dup_e.ttcn",
1099 "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
1100 }
1101 }
1102
970ed795
EL
1103}//UnionTest
1104
1105
1106
1107group ComplexType {
1108
1109 testcase tc_complex1() runs on xmlTest_CT {
1110
1111 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
1112
1113 if(getverdict==pass) {
1114 f_compareFiles(
1115 "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
1116 f_encDecTest_InternationalPrice();
1117 }
1118 }//tc_
1119
1120 //TR: HL24977 -Solved
1121 testcase tc_complex2() runs on xmlTest_CT {
1122
1123 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
1124
1125 if(getverdict==pass) {
1126 f_compareFiles(
1127 "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
1128 }
1129 f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
1130 f_encDecTest_InternationalPrice3();
1131 f_encDecTest_InternationalPrice4();
1132 }//tc_
1133
1134 testcase tc_complex_simpleContent() runs on xmlTest_CT {
1135
1136 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
1137
1138 if(getverdict==pass) {
1139 f_compareFiles(
1140 "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
1141 f_encDecTest_ComplexTypeWithSimpleContent1();
1142 f_encDecTest_ComplexTypeWithSimpleContent2();
1143 f_encDecTest_ComplexTypeWithSimpleContent2_neg();
1144 }
1145 }//tc_
1146
3abe9331 1147 testcase tc_complex_namespaceas() runs on xmlTest_CT {
1148
1149 f_shellCommandWithVerdict("xsd2ttcn namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
1150
1151 if(getverdict==pass) {
1152 f_compareFiles(
1153 "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
1154 f_compareFiles(
1155 "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
1156 }
1157 }//tc_
1158
970ed795
EL
1159 testcase tc_complex_mixed_conv() runs on xmlTest_CT {
1160
1161 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
1162
1163 if(getverdict==pass) {
1164 f_compareFiles(
1165 "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
1166 }
1167 }//tc_
1168
3abe9331 1169 testcase tc_complex_group_reference() runs on xmlTest_CT {
1170
1171 f_shellCommandWithVerdict("xsd2ttcn seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
1172
1173 if(getverdict==pass) {
1174 f_compareFiles(
1175 "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
1176 }
1177 }//tc_
1178
970ed795
EL
1179 //TR:HL29258
1180 testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
1181 f_encDecTest_ComplexTypeWithMixed();
1182 }//tc_
1183
3abe9331 1184 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {
1185
1186 f_shellCommandWithVerdict("xsd2ttcn sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
1187
1188 if(getverdict==pass) {
1189 f_compareFiles(
1190 "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
1191 f_encDecTest_InternationalPrice();
1192 }
1193 }//tc_
970ed795
EL
1194
1195 testcase tc_complex_choice_converter() runs on xmlTest_CT {
1196
3abe9331 1197 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
970ed795
EL
1198
1199 if(getverdict==pass) {
1200 f_compareFiles(
1201 "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
1202 }
1203 }//tc_
1204
1205 //
1206 testcase tc_complex_choice_encDec() runs on xmlTest_CT {
1207 f_encDecTest_ComplexTypeWithChoice_1();
1208 f_encDecTest_ComplexTypeWithChoice_2();
1209 f_encDecTest_ComplexTypeWithChoice_3();
1210 f_encDecTest_ComplexTypeWithChoice_4();
1211 f_encDecTest_ComplexTypeWithChoice_5();
1212 f_encDecTest_ComplexTypeWithChoice_6();
1213 f_encDecTest_ComplexTypeWithChoice_7();
1214 f_encDecTest_ComplexTypeWithChoice_8();
1215 f_encDecTest_ComplexTypeWithChoice_9();
1216 f_encDecTest_ComplexTypeWithChoice_10();
1217 }//tc_
1218
1219 //Passed, TR: HL30830 -solved
1220 testcase tc_complex_all_converter() runs on xmlTest_CT {
1221 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
1222
1223 if(getverdict==pass) {
1224 f_compareFiles(
1225 "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
1226 }
1227 }//tc_
1228
1229 //HL29679
1230 testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
1231 var MySubjects1 vl_pdu:= {
1232 order:={},
1233 year:="2009",
1234 english:=omit,
1235 math:=omit,
1236 physics:=omit,
1237 chemistry:=omit
1238 }
1239 var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
1240 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1241 }//tc_
1242
1243 testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
1244 var MySubjects1 vl_pdu:= {
1245 order:={math,english,chemistry, physics},
1246 year:="2009",
1247 english:="Advanced Group 1",
1248 math:="Beginners 1",
1249 physics:="Mechanics 1",
1250 chemistry:="CH2"
1251 }
1252 var charstring vl_expectedEncodedPdu:=
1253 "<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"
1254 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1255 }//tc_
1256
1257 testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
1258 var MySubjects1 vl_pdu:= {
1259 order:={math,english,chemistry},
1260 year:="2009",
1261 english:="Advanced Group 1",
1262 math:="Beginners 1",
1263 physics:=omit,
1264 chemistry:="CH2"
1265 },
1266 vl_expectedPdu:={
1267 order:={math,english},
1268 year:="2009",
1269 english:="Advanced Group 1",
1270 math:="Beginners 1",
1271 physics:=omit,
1272 chemistry:=omit
1273 };
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</MySubjects1>\n\n"
1276 f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1277 }//tc_
1278
1279 testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
1280 f_encDecTest_ComplexTypeWithAll_inconsistentSet();
1281 }//tc_
1282
1283 //positive testcase for group "all". The type has no optional field (element).The input is correct
1284 testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
1285 var MySubjects2 vl_pdu:= {
3abe9331 1286 order:={math,english,chemistry, physics,history},
970ed795 1287 year:="2009",
3abe9331 1288 english:="Advanced Group 1",
1289 math:="Beginners 1",
1290 physics:="Mechanics 1",
1291 chemistry:="CH2",
1292 history:="H1"
970ed795
EL
1293 }
1294 var charstring vl_expectedEncodedPdu:=
1295 "<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";
1296 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
1297 }//tc_
1298
1299 //Negative testcase for group "all". The type has no optional field (element).
1300 //The input is not correct: value of one field (history) is missing
1301 //Passed, TR: HL32978
1302 testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
1303 var MySubjects2 vl_pdu:= {
3abe9331 1304 order:={math,english,chemistry, physics,history},
970ed795 1305 year:="2009",
3abe9331 1306 english:="Advanced Group 1",
1307 math:="Beginners 1",
1308 physics:="Mechanics 1",
1309 chemistry:="CH2"
1310 //history:="H1"
970ed795
EL
1311 }
1312 var MySubjects2 vl_expectedDecodedPdu:= {
3abe9331 1313 order:={math,english,chemistry, physics,history},
970ed795 1314 year:="2009",
3abe9331 1315 english:="Advanced Group 1",
1316 math:="Beginners 1",
1317 physics:="Mechanics 1",
1318 chemistry:="CH2",
1319 history:=""
970ed795
EL
1320 }
1321 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"
1322 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
1323 }//tc_
1324
1325 //Negative testcase for group "all". The type has no optional field (element).
1326 //The input is not correct: value of one field (history) and its place in order-list is missing.
1327 // ***Less elements of record of order than required***
1328 //expectation: error report at encoding, returning 1 at decoding
1329 //Passed, TR: HL32978
1330 testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
1331 var MySubjects2 vl_pdu:= {
3abe9331 1332 order:={math,english,chemistry, physics},
970ed795 1333 year:="2009",
3abe9331 1334 english:="Advanced Group 1",
1335 math:="Beginners 1",
1336 physics:="Mechanics 1",
1337 chemistry:="CH2"
1338 //history:="H1"
970ed795
EL
1339 }
1340 var MySubjects2 vl_expectedDecodedPdu:= {
3abe9331 1341 order:={math,english,chemistry, physics},
970ed795 1342 year:="2009",
3abe9331 1343 english:="Advanced Group 1",
1344 math:="Beginners 1",
1345 physics:="Mechanics 1",
1346 chemistry:="CH2",
1347 history:=""
970ed795
EL
1348 }
1349 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1350 //"<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"
1351 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
1352 }//tc_
1353
1354 //Negative testcase for group "all". The type has no optional field (element).
1355 //The input is not correct: order three times contains "math", Physics and history are missing.
1356 //expectation: error report at encoding, returning 1 at decoding
1357 //Passed, TR: HL32978
1358 testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
1359 var MySubjects2 vl_pdu:= {
3abe9331 1360 order:={math,english,chemistry,math,math},
970ed795 1361 year:="2009",
3abe9331 1362 english:="Advanced Group 1",
1363 math:="Beginners 1",
1364 physics:="Mechanics 1",
1365 chemistry:="CH2"
1366 //history:="H1"
970ed795
EL
1367 }
1368 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1369 //"<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"
1370 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1371 }//tc_
1372
1373
1374 //=========================================================================
1375 // tc_complex_all_noOptional_empty_encDec
1376 //=========================================================================
1377 //Negative testcase for group "all". The type has no optional field (element).
1378 //The input is not correct: value of all the fields and their place in order-list is missing
1379 //expectation: error report at encoding
1380 //Passed, TR: HL32978
1381 testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
1382 var MySubjects2 vl_pdu:= {
3abe9331 1383 order:={ },
1384 year:="2009"
1385 //english:="Advanced Group 1",
1386 //math:="Beginners 1",
1387 //physics:="Mechanics 1",
1388 //chemistry:="CH2"
1389 //history:="H1"
970ed795
EL
1390 }
1391 var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
1392 f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
1393 }//tc_
1394
1395 //=========================================================================
1396 // tc_complex_minOccursMaxOccurs
1397 //=========================================================================
1398 //Old name: tc_XmlTest_minOccursMaxOccurs
1399 ////TR (ethgry): HL10386
1400 testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
1401 {
1402 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
1403 if(getverdict==pass) {
1404 f_compareFiles(
1405 "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
1406 }
1407 }
1408
1409
1410 testcase tc_complex_extension_converter() runs on xmlTest_CT {
1411 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
1412
1413 if(getverdict==pass) {
1414 f_compareFiles(
1415 "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
1416 }
1417 }//tc_
1418
3abe9331 1419 testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1420 f_shellCommandWithVerdict("xsd2ttcn name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
1421
1422 if(getverdict==pass) {
1423 f_compareFiles(
1424 "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1425 }
1426 }//tc_
1427
1428 testcase tc_complex_long_extension() runs on xmlTest_CT {
1429 f_shellCommandWithVerdict("xsd2ttcn long_extension.xsd","",c_shell_successWithoutWarningAndError)
1430
1431 if(getverdict==pass) {
1432 f_compareFiles(
1433 "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
1434 }
1435 }//tc_
1436
1437 testcase tc_complex_self_recursion() runs on xmlTest_CT {
1438 f_shellCommandWithVerdict("xsd2ttcn complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
1439
1440 if(getverdict==pass) {
1441 f_compareFiles(
1442 "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
1443 }
1444 }//tc_
1445
1446 testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1447 f_shellCommandWithVerdict("xsd2ttcn type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
1448
1449 if(getverdict==pass) {
1450 f_compareFiles(
1451 "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
1452 }
1453 }//tc_
1454
1455 testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1456 f_shellCommandWithVerdict("xsd2ttcn attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
1457
1458 if(getverdict==pass) {
1459 f_compareFiles(
1460 "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
1461 }
1462 }//tc_
1463
1464 testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1465 f_shellCommandWithVerdict("xsd2ttcn attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
1466
1467 if(getverdict==pass) {
1468 f_compareFiles(
1469 "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
1470 }
1471 }//tc_
1472
1473 testcase tc_attrib_enum() runs on xmlTest_CT {
1474 f_shellCommandWithVerdict("xsd2ttcn attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
1475
1476 if(getverdict==pass) {
1477 f_compareFiles(
1478 "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
1479 }
1480 }//tc_
1481
970ed795
EL
1482 testcase tc_complex_extension_encDec() runs on xmlTest_CT
1483 {
1484 var MySubjects3Extension vl_pdu:={
1485 semester:="Autumn",
1486 year:="2009",
1487 english:="B1",
1488 math:=omit,
1489 physics:="Optics",
1490 chemistry:=omit,
1491 arts:="Impressionism"
1492 }
1493 var charstring vl_expectedEncodedPdu:=
1494 "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
1495 f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1496 }
1497
1498 testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1499 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
1500
1501 if(getverdict==pass) {
1502 f_compareFiles(
1503 "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
1504 }
1505 }//tc_
1506
3abe9331 1507 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1508 f_shellCommandWithVerdict("xsd2ttcn complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
1509
1510 if(getverdict==pass) {
1511 f_compareFiles(
1512 "http_www_example_org_complex_restriction_with_use_e.ttcn",
1513 "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
1514 }
1515 }//tc_
1516
1517 testcase tc_complex_nillable() runs on xmlTest_CT {
1518 f_shellCommandWithVerdict("xsd2ttcn complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
1519
1520 if(getverdict==pass) {
1521 f_compareFiles(
1522 "www_example_org_complex_nillable_e.ttcn",
1523 "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
1524 }
1525 }//tc_
1526
1527 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
1528 testcase tc_nillable_fixed() runs on xmlTest_CT {
1529 f_shellCommandWithVerdict("xsd2ttcn nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
1530
1531 if(getverdict==pass) {
1532 f_compareFiles(
1533 "www_example_org_nillable_fixed_e.ttcn",
1534 "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
1535 }
1536 }//tc_
1537
1538 testcase tc_no_ns_connector() runs on xmlTest_CT {
51fa56b9 1539 f_shellCommandWithVerdict("xsd2ttcn no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 1540
1541 if(getverdict==pass) {
1542 f_compareFiles(
1543 "www_example_org_no_ns_connector_e.ttcn",
1544 "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
1545 }
1546 }//tc_
1547
970ed795
EL
1548 testcase tc_complex_restriction_encDec() runs on xmlTest_CT
1549 {
1550 var MySubjects4Restriction vl_pdu:={
1551 year:="2009",
1552 english:="B1",
1553 math:="Combinatorics 1"
1554 }
1555 var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
1556 f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1557 }
1558 //TR: HL32948, Solved
1559 testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
1560 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
1561 }//tc_
1562
1563 //TR: HL32948, Solved
1564 testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
1565 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
1566 }//tc_
1567
1568 //not supported:
1569 testcase tc_complex_unique_converter() runs on xmlTest_CT {
1570 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
1571 }//tc_
1572
1573 //Positive test: The including and the included schema are in the same namespace
1574 testcase tc_complex_include_converter() runs on xmlTest_CT {
1575 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1576
1577 if(getverdict==pass) {
1578 f_compareFiles(
1579 "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerAndModuleName);
1580 }
1581 }//tc_
1582
1583 //=========================================================================
1584 // tc_complex_include_neg1_converter
1585 //=========================================================================
1586 //Negative test: The including and the included schema are not in the same namespace
1587 testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
1588 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
1589 }//tc_
1590
1591 //=========================================================================
1592 // tc_complex_import_pos1_converter
1593 //=========================================================================
1594 //Positive test: The including and the included schema are in different namespaces (import and include)
1595 testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
1596 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1597
1598 if(getverdict==pass) {
1599 f_compareFiles(
1600 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndImport);
1601
1602 f_compareFiles(
1603 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndImport);
1604 }
1605 }//tc_
1606
1607 //=========================================================================
1608 // tc_complex_import_pos2_converter
1609 //=========================================================================
1610 //Pos test: Checks if the converter can choose the file having the correct namespace
1611 //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
1612 testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
1613 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1614
1615 if(getverdict==pass) {
1616 f_compareFiles(
1617 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace);
1618
1619 f_compareFiles(
1620 "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_headerModNameAndNamespace);
1621 }
1622 }//tc_
1623
1624 //=========================================================================
1625 // tc_complex_import_neg1_converter
1626 //=========================================================================
1627 //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
1628 //If the type checking is switched off the testcase fails.
1629 testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
1630 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
1631 }//tc_
1632
1633 //=========================================================================
1634 // tc_complex_import_withSL_converter
1635 //=========================================================================
1636 //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
1637 testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
1638 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);
1639
1640 if(getverdict==pass) {
1641 f_compareFiles(
1642 "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff_headerModNameAndNamespace+4);
1643 }
1644 }//tc_
1645
1646 //=========================================================================
1647 // tc_complex_import_withSL_encDec
1648 //=========================================================================
1649 // TODO: fix HR88527
1650 testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
1651 var PurchaseReportImport pl_pdu:= {
1652 period :="P3M",
1653 periodEnding :="1999-12-31",
1654 regions:= {
1655 zip_list :={
1656 {
1657 code:=95819,
1658 part_list:= {
1659 {
1660 number:="872-AA",
1661 quantity:=1
1662 },
1663 {
1664 number:="926-AA",
1665 quantity:=2
1666 }
1667 }
1668 }
1669 }
1670 },
1671 parts :={
1672 part_list:= {
1673 {
1674 number:="872-AA",
1675 base:="Lawnmower"
1676 },
1677 {
1678 number:="926-AA",
1679 base:="Baby Monitor"
1680 }
1681 }
1682 }
1683 }
1684 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";
1685 //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
1686 f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
1687 }//tc_
1688
1689 //=========================================================================
1690 // tc_complex_import_nameCollision_converter
1691 //=========================================================================
1692 //imports the same type from different namespaces
1693 testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
1694 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);
1695
1696 if(getverdict==pass) {
1697 f_compareFiles(
1698 "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff_headerAndModuleName);
1699 f_compareFiles(
1700 "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff_headerAndModuleName);
1701 f_compareFiles(
1702 "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", 10+c_numOfDiff_headerModNameAndImport);
1703 }
1704 }//tc_
1705
1706 //=========================================================================
1707 // tc_complex_import_nameCollision2_converter
1708 //=========================================================================
1709 //imports the same type from different namespaces
1710 testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
1711 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
1712 }//tc_
1713
1714 //=========================================================================
1715 // tc_complex_any_pos_converter
1716 //=========================================================================
1717 testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
3abe9331 1718 f_shellCommandWithVerdict("xsd2ttcn XmlTest_complex_any.xsd","",c_shell_successWithWarning);
970ed795
EL
1719
1720 if(getverdict==pass) {
1721 f_compareFiles(
1722 "www_XmlTest_org_complex_any_e.ttcn","www_XmlTest_org_complex_any.ttcn", c_numOfDiff_headerAndModuleName);
1723 }
1724 }//tc_
1725
3abe9331 1726 testcase tc_imported_type_prefix() runs on xmlTest_CT {
1727 f_shellCommandWithVerdict("xsd2ttcn import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);
1728
1729 if(getverdict==pass) {
1730 f_compareFiles(
1731 "www_example_org_import_prefix_e.ttcn","www_example_org_import_prefix.ttcn", c_numOfDiff_headerAndModuleName);
1732 }
1733 }//tc_
1734
970ed795
EL
1735
1736 //=========================================================================
1737 // tc_complex_any_pos1_encDec
1738 // Failed, TR: HL37887
1739 //=========================================================================
1740 testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {
1741
1742 var ElementContainingXhtml_1 vl_pdu := {
1743 firstField:="1st field",
1744 elem_list:= {
1745 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1746 },
1747 thirdField:="3rd field"
1748 }
1749 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";
1750 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1751 }//tc_
1752
1753 //=========================================================================
1754 // tc_complex_any_pos2_encDec
1755 //=========================================================================
1756 testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {
1757
1758 var ElementContainingXhtml_2 vl_pdu := {
1759 elem_list:= {
1760 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>"
1761 }
1762 }
1763 var charstring vl_expectedEncodedPdu:=
1764 "<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";
1765 f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1766 }//tc_
1767
1768 //=========================================================================
1769 // tc_complex_any_pos3_encDec
1770 // Failed, TR: HL37887
1771 //=========================================================================
1772 testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {
1773
1774 var ElementContainingXhtml_1 vl_pdu :=
1775 {
1776 firstField := "1st field",
1777 elem_list := {
1778 "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n <tr><td>95819</td><td> </td><td> </td></tr>\n </table>",
1779 "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
1780 thirdField := "3rd field"
1781 }
1782
1783 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";
1784 f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
1785 }//tc_
1786
1787}//complexTypes
1788
1789//=========================================================================
1790// group Elements
1791//=========================================================================
1792group Elements{
1793
1794 //Passed
1795 testcase tc_element_anyType_converter() runs on xmlTest_CT {
1796
1797 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_anyType.xsd","",c_shell_successWithoutWarningAndError)
1798
1799 if(getverdict==pass) {
1800 f_compareFiles(
1801 "www_XmlTest_org_element_anyType_e.ttcn","www_XmlTest_org_element_anyType.ttcn", c_numOfDiff_headerAndModuleName);
1802 }
1803 }//tc_
1804
3abe9331 1805 testcase tc_element_attrib_qualified() runs on xmlTest_CT {
1806
1807 f_shellCommandWithVerdict("xsd2ttcn qualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1808
1809 if(getverdict==pass) {
1810 f_compareFiles(
1811 "www_example_org_qualified_element_attrib_e.ttcn","www_example_org_qualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1812 }
1813 }//tc_
1814
1815 testcase tc_element_attrib_unqualified() runs on xmlTest_CT {
1816
1817 f_shellCommandWithVerdict("xsd2ttcn unqualified_element_attrib.xsd","",c_shell_successWithoutWarningAndError)
1818
1819 if(getverdict==pass) {
1820 f_compareFiles(
1821 "www_example_org_unqualified_element_attrib_e.ttcn","www_example_org_unqualified_element_attrib.ttcn", c_numOfDiff_headerAndModuleName);
1822 }
1823 }//tc_
1824
970ed795
EL
1825 //Passed TR: Hl29679
1826 testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
1827 var Anything1 vl_pdu:= { attr:={},elem_list:={}};
1828 var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n\n"
1829 f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
1830 }//tc_
1831
1832 //Passed
1833 testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
1834 var Anything1 vl_pdu:= { attr:={"name=\"First\""},elem_list:={}};
1835 var charstring vl_expectedEncodedPdu:=
1836 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n\n";
1837 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1838 }//tc_
1839
1840 testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
1841 var Anything1 vl_pdu:= { attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
1842 var charstring vl_expectedEncodedPdu:=
1843 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n\n";
1844 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1845 }//tc_
1846
1847 //Passed, TR: HL29711
1848 testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
1849 var Anything1 vl_pdu:= { attr:={ }, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1850 var charstring vl_expectedEncodedPdu:=
1851 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'>\n\t<MyElement1/>\n\t<MyElement2></MyElement2>\n</ns31:anything1>\n\n"
1852 var Anything1 vl_expectedDecodedPdu:= { attr:={ }, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
1853 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1854 }//tc_
1855
1856 testcase tc_element_anyType_encDec() runs on xmlTest_CT {
1857 var Anything1 vl_pdu:= {
1858 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1859 elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
1860 var charstring vl_expectedEncodedPdu:=
1861 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">\n\t<MyElement1/>\n\t<MyElement2></MyElement2>\n</ns31:anything1>\n\n";
1862 var Anything1 vl_expectedDecodedPdu:= {
1863 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1864 elem_list:={"<MyElement1/>", "<MyElement2/>"}
1865 };
1866 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
1867 }//tc_
1868
1869 //===============================================================
1870 // tc_element_anyType_deeper_encDec
1871 //===============================================================
1872 testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
1873 var Anything1 vl_pdu:= {
1874 attr:={"name=\"Hunor\"","nationality=\"HU\""},
1875 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>"} };
1876
1877 var charstring vl_expectedEncodedPdu:=
1878 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">\n\t<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>\n\t<MyElement2><Level2>Goddag</Level2>\n</MyElement2>\n</ns31:anything1>\n\n"
1879 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1880 }//tc_
1881
1882
1883 type record of charstring charstringList;
1884
1885 //===============================================================
1886 // tc_element_anyType_longer_encDec
1887 //===============================================================
1888 testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
1889 var charstringList vl_elementList:= {
1890 "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
1891 "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
1892 "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
1893 "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
1894 };
1895 var Anything1 vl_pdu:= {
1896 attr:={
1897 "name=\"Hunor\"",
1898 "nationality=\"HU\""
1899 },
1900 elem_list:={ }
1901 };
1902
1903 var charstring vl_expectedEncodedPdu:=
1904 "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">\n";
1905
1906 for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
1907 vl_pdu.elem_list[i]:=vl_elementList[i];
1908 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "\t" & vl_elementList[i] & "\n";
1909 }
1910 vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n\n"
1911
1912 f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
1913 }//tc_
1914
1915
1916 //===============================================================
1917 // tc_element_recOfElements_converter
1918 //===============================================================
1919 //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
1920 testcase tc_element_recOfElements_converter() runs on xmlTest_CT {
1921
1922 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1923
1924 if(getverdict==pass) {
1925 f_compareFiles(
1926 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1927 }
1928 }//tc_
1929
1930 //Passed, old name: tc_element_recOfElements
1931 testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
1932 f_encDecTest_PersonInfo1();
1933 f_encDecTest_PersonInfo2();
1934 f_encDecTest_PersonInfo2_omitOptionals();
1935// }
1936 }//tc_
1937
1938 //Passed, TR HL27452
1939 testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
1940 f_encDecTest_PersonInfo2_defaultAttribute();
1941 }//tc_
1942
1943 //Passed: TR:27484
1944 testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {
1945
1946 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements.xsd","",c_shell_successWithoutWarningAndError)
1947
1948 if(getverdict==pass) {
1949 f_compareFiles(
1950 "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff_headerModNameAndNamespace);
1951 f_encDecTest_PersonInfo1_defaultElement();
1952 }
1953 }//tc_
1954
1955 //Passed
1956 testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {
1957
1958 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements4.xsd","",c_shell_successWithoutWarningAndError)
1959
1960 if(getverdict==pass) {
1961 f_compareFiles(
1962 "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff_headerModNameAndNamespace);
1963 f_encDecTest_PersonInfo4();
1964 }
1965 }//tc_
1966
1967 //Passed, TR:HL28010
1968 testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {
1969
1970 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements3.xsd","",c_shell_successWithoutWarningAndError)
1971
1972 if(getverdict==pass) {
1973 f_compareFiles(
1974 "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff_headerModNameAndNamespace);
1975 }
1976
1977 }//tc_
1978
1979 //Passed, TR: HL28024
1980 testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {
1981
1982 f_encDecTest_PersonInfo3();
1983 }//tc_
1984
1985 testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {
1986
1987 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_recordOfElements5.xsd","",c_shell_successWithoutWarningAndError)
1988
1989 if(getverdict==pass) {
1990 f_compareFiles(
1991 "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff_headerModNameAndNamespace);
1992 }
1993
1994 }//tc_
1995
1996 testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
1997 f_encDecTest_PersonInfo5();
1998 }//tc_
1999
2000
3abe9331 2001 testcase tc_substitutiongroup() runs on xmlTest_CT {
2002
2003 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup.xsd","",c_shell_successWithoutWarningAndError)
2004
2005 if(getverdict==pass) {
2006 f_compareFiles(
2007 "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2008 }
2009
2010 }//tc_
2011
51fa56b9 2012 testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {
2013
2014 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_name_as.xsd","",c_shell_successWithoutWarningAndError)
2015
2016 if(getverdict==pass) {
2017 f_compareFiles(
2018 "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff_headerModNameAndNamespace);
2019 }
2020
2021 }//tc_
2022
3abe9331 2023 testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {
2024
51fa56b9 2025 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_1.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 2026
2027 if(getverdict==pass) {
2028 f_compareFiles(
2029 "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
2030 "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2031 }
2032
2033 }//tc_
2034
2035 testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {
2036
51fa56b9 2037 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_abstract_block_2.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 2038
2039 if(getverdict==pass) {
2040 f_compareFiles(
2041 "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
2042 "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2043 }
2044
2045 }//tc_
2046
2047 testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {
2048
51fa56b9 2049 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 2050
2051 if(getverdict==pass) {
2052 f_compareFiles(
2053 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2054 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2055 }
2056
2057 }//tc_
2058
2059 testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {
2060
51fa56b9 2061 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complex_without_element.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 2062
2063 if(getverdict==pass) {
2064 f_compareFiles(
2065 "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
2066 "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff_headerModNameAndNamespace);
2067 }
2068
2069 }//tc_
2070
51fa56b9 2071 testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {
2072
2073 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_complextype_block.xsd","",c_shell_successWithoutWarningAndError)
2074
2075 if(getverdict==pass) {
2076 f_compareFiles(
2077 "www_example_org_substitutiongroup_complextype_block_e.ttcn",
2078 "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2079 }
2080
2081 }//tc_
2082
2083 //Test if we find the substitutiongroup references in notargetnamespace
2084 testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {
2085
2086 //f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
2087 setverdict(pass);
2088
2089 }//tc_
2090
3abe9331 2091 testcase tc_substitutiongroup_neg() runs on xmlTest_CT {
2092
2093 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_neg.xsd","",c_shell_error)
2094
2095 }//tc_
2096
2097 testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {
2098
51fa56b9 2099 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)
3abe9331 2100
2101 if(getverdict==pass) {
2102 f_compareFiles(
2103 "www_example_org_substitutiongroup_ref_e.ttcn",
2104 "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff_headerModNameAndNamespace);
2105 }
2106
2107 if(getverdict==pass) {
2108 f_compareFiles(
2109 "www_example_org_substitutiongroup_main_e.ttcn",
2110 "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff_headerModNameAndNamespace);
2111 }
2112
2113 }//tc_
2114
51fa56b9 2115 testcase tc_substitutiongroup_rename() runs on xmlTest_CT {
2116
2117 f_shellCommandWithVerdict("xsd2ttcn substitutiongroup_rename.xsd","",c_shell_successWithoutWarningAndError)
2118
2119 if(getverdict==pass) {
2120 f_compareFiles(
2121 "www_example_org_substitutiongroup_rename_e.ttcn",
2122 "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2123 }
2124
2125 }//tc_
2126
2127 testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {
2128
2129 f_encDecTest_ize_subs();
2130 }
2131
2132 testcase tc_type_substitution() runs on xmlTest_CT {
2133
2134 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)
2135
2136 if(getverdict==pass) {
2137 f_compareFiles(
2138 "www_example_org_type_substitution_e.ttcn",
2139 "www_example_org_type_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2140 }
2141
2142 }//tc_
2143
2144 testcase tc_type_substitution_encDec() runs on xmlTest_CT {
2145
2146 f_encDecTest_type_subs();
2147
2148 }//tc_
2149
2150 testcase tc_type_substitution_chain() runs on xmlTest_CT {
2151
2152 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)
2153
2154 if(getverdict==pass) {
2155 f_compareFiles(
2156 "www_example_org_type_substitution_chain_e.ttcn",
2157 "www_example_org_type_substitution_chain.ttcn", c_numOfDiff_headerModNameAndNamespace);
2158 }
2159
2160 }//tc_
2161
2162 testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {
2163
2164 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)
2165
2166 if(getverdict==pass) {
2167 f_compareFiles(
2168 "www_example_org_type_substitution_abstract_block_e.ttcn",
2169 "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff_headerModNameAndNamespace);
2170 }
2171
2172 }//tc_
2173
2174 testcase tc_type_substitution_diff_module() runs on xmlTest_CT {
2175
2176 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)
2177
2178 if(getverdict==pass) {
2179 f_compareFiles(
2180 "www_example_org_type_substitution_mod1_e.ttcn",
2181 "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2182 }
2183
2184 if(getverdict==pass) {
2185 f_compareFiles(
2186 "www_example_org_type_substitution_mod2_e.ttcn",
2187 "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2188 }
2189
2190 }//tc_
2191
2192 testcase tc_type_substitution_simpletype() runs on xmlTest_CT {
2193
2194 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)
2195
2196 if(getverdict==pass) {
2197 f_compareFiles(
2198 "www_example_org_type_substitution_simpletype_e.ttcn",
2199 "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2200 }
2201
2202 }//tc_
2203
2204 testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {
2205
2206 f_shellCommandWithVerdict("xsd2ttcn -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)
2207
2208 if(getverdict==pass) {
2209 f_compareFiles(
2210 "www_example_org_type_subs_with_elem_subs_e.ttcn",
2211 "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff_headerModNameAndNamespace);
2212 }
2213
2214 }//tc_
2215
2216 testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {
2217
2218 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)
2219
2220 if(getverdict==pass) {
2221 f_compareFiles(
2222 "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
2223 "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff_headerModNameAndNamespace);
2224 }
2225
2226 if(getverdict==pass) {
2227 f_compareFiles(
2228 "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
2229 "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff_headerModNameAndNamespace);
2230 }
2231
2232 }//tc_
2233
2234 testcase tc_only_element_substitution() runs on xmlTest_CT {
2235
2236 f_shellCommandWithVerdict("xsd2ttcn -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)
2237
2238 if(getverdict==pass) {
2239 f_compareFiles(
2240 "www_example_org_only_element_substitution_e.ttcn",
2241 "www_example_org_only_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
2242 }
2243
2244 }//tc_
2245
2246 testcase tc_type_substitution_builtintype() runs on xmlTest_CT {
2247
2248 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)
2249
2250 if(getverdict==pass) {
2251 f_compareFiles(
2252 "www_example_org_type_substitution_builtintype_e.ttcn",
2253 "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff_headerModNameAndNamespace);
2254 }
2255
2256 }//tc_
2257
2258 testcase tc_type_substitution_rename() runs on xmlTest_CT {
2259
2260 f_shellCommandWithVerdict("xsd2ttcn -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)
2261
2262 if(getverdict==pass) {
2263 f_compareFiles(
2264 "www_example_org_type_substitution_rename_e.ttcn",
2265 "www_example_org_type_substitution_rename.ttcn", c_numOfDiff_headerModNameAndNamespace);
2266 }
2267
2268 }//tc_
2269
3abe9331 2270
2271
970ed795
EL
2272 //========================================================
2273 // tc_element_nameInheritance_conv
2274 // Checks if name of named (aliased) type is not inherited
2275 //========================================================
2276 testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
2277 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
2278 }//tc_
2279
2280 //========================================
2281 // tc_element_nameInheritance_encDec
2282 // Checks if name of named (aliased) type is not inherited
2283 //========================================
2284 //TR HL49978
2285 testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
2286 f_encDecTest_nameInheritance();
2287 }//tc_
2288
2289 //========================================
2290 // tc_element_Tgc_encDec
2291 // Checks if name of named (aliased) type is not inherited
2292 //========================================
2293 //TR HL49978
2294 testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
2295 f_encDecTest_Tgc();
2296 }//tc_
2297
3abe9331 2298 //"Abstract" are not supported. Therefore converter sends WARNINGs
970ed795 2299 testcase tc_element_abstract_conv() runs on xmlTest_CT {
51fa56b9 2300 f_shellCommandWithVerdict("xsd2ttcn XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
970ed795
EL
2301 }//tc_
2302
2303 testcase tc_element_nillable_converter() runs on xmlTest_CT {
2304 f_shellCommandWithVerdict("xsd2ttcn -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );
2305
2306 if(getverdict==pass) {
2307 f_compareFiles(
2308 "XmlTest_imsike_e.ttcn","XmlTest_imsike.ttcn", c_numOfDiff_headerAndModuleName);
2309 }
2310 }//tc_
2311
3abe9331 2312 testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
2313 f_shellCommandWithVerdict("xsd2ttcn nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );
2314
2315 if(getverdict==pass) {
2316 f_compareFiles(
2317 "nillable_annotations_e.ttcn","nillable_annotations.ttcn", c_numOfDiff_headerAndModuleName);
2318 }
2319 }//tc_
2320
2321 testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
2322 f_shellCommandWithVerdict("xsd2ttcn nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );
2323
2324 if(getverdict==pass) {
2325 f_compareFiles(
2326 "http_www_example_org_nillable_in_nillable_extension_e.ttcn",
2327 "http_www_example_org_nillable_in_nillable_extension.ttcn", c_numOfDiff_headerAndModuleName);
2328 }
2329 }//tc_
2330
2331 testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
2332 f_shellCommandWithVerdict("xsd2ttcn attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );
2333
2334 if(getverdict==pass) {
2335 f_compareFiles(
2336 "www_example_org_type_attributegroup_nillable_e.ttcn",
2337 "www_example_org_type_attributegroup_nillable.ttcn", c_numOfDiff_headerAndModuleName);
2338 }
2339 }//tc_
2340
2341 testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
2342 f_shellCommandWithVerdict("xsd2ttcn attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );
2343
2344 if(getverdict==pass) {
2345 f_compareFiles(
2346 "www_example_org_attribgroup_ingroup_e.ttcn",
2347 "www_example_org_attribgroup_ingroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
2348 }
2349 }//tc_
2350
970ed795
EL
2351 //IndividualTrigger, nile="false"
2352 testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
2353 f_encDecTest_IndividualTrigger1();
2354 }//tc_
2355
2356 //IndividualTrigger, nil="true"
2357 testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
2358 f_encDecTest_IndividualTrigger2(); //empty record
2359 }//tc_
2360
2361 //Isp, nil="false"
2362 testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
2363 f_encDecTest_Isp1();
2364 }//tc_
2365
2366 //Isp, nil="true"
2367 testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
2368 f_encDecTest_Isp2();
2369 }//tc_
2370
2371 //RemarkNillable, nil="false"
2372 testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
2373 f_encDecTest_RemarkNillable1();
2374 }//tc_
2375
2376 //RemarkNillable, nil="true"
2377 testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
2378 f_encDecTest_RemarkNillable2();
2379 }//tc_
2380
2381}//Element
2382
2383//=========================================================================
2384// Control
2385//=========================================================================
2386
2387control {
2388 execute(tc_versionTest());//Passed
2389 execute(tc_xsd2ttcn_versionTest());//Passed
2390 //====My tcs====
2391 execute(tc_firstTrial());//Passed
2392 execute(tc_secondTrial());//Passed
2393 execute(tc_empty()); //Passed, TR:
2394 //appended to increase coverage:
2395
2396 execute(tc_annotation());
2397 execute(tc_annotation1());
2398 execute(tc_annotation2());
3abe9331 2399 execute(tc_xml_in_annotation());
970ed795
EL
2400 //option tests:
2401 execute(tc_version());
2402 execute(tc_options_c());
2403 execute(tc_options_e());
2404 execute(tc_options_f());
3abe9331 2405 execute(tc_options_g());
970ed795
EL
2406 execute(tc_options_p());
2407 execute(tc_options_s());
2408 execute(tc_options_t());
2409 execute(tc_options_v());
2410 execute(tc_options_V());
2411 execute(tc_options_w());
2412 execute(tc_options_x());
2413 execute(tc_options_wrong());
2414 execute(tc_options_missing());
2415 //===LABEL and DEFINITION - unknown but used tags
2416
2417 //===ttcn standard===
2418 execute(tc_XmlTest_all());//Passed
3abe9331 2419 execute(tc_element_in_all_neg());
970ed795
EL
2420 execute(tc_XmlTest_any_anyAttribute());//Passed
2421 execute(tc_XmlTest_HQ73011());//Passed
3abe9331 2422 execute(tc_anyattribute_optional());
2423 execute(tc_anyattribute_single());
2424 execute(tc_anyattribute_in_complex());
970ed795
EL
2425 execute(tc_XmlTest_attributeGroup());//Passed
2426 execute(tc_XmlTest_attribute_use_noTNS());//Passed
3abe9331 2427 execute(tc_id_attribute());
2428 execute(tc_attribute_order());
2429 execute(tc_name_conv_non_alphanumeric());
2430 execute(tc_module_name_convert_with_diff_namespace());
2431 execute(tc_module_typename_conversion());
2432 execute(tc_name_conv_remove_seq_of_low_line());
2433 execute(tc_name_conv_with_z());
2434 execute(tc_comment_placement());
970ed795
EL
2435
2436 //===W3C standard===
2437
2438 //===String===
2439 execute(tc_string()); //passed
2440 execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
2441 execute(tc_string_withEnum());//Passed, TR: HL26227
2442 execute(tc_string_withPosLength());//TR: HL21257,
2443 execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
2444 execute(tc_string_withNegativeLength());//Passed
2445 execute(tc_string_withFixedLength()); //Passed
3abe9331 2446 execute(tc_fixed_value());
970ed795
EL
2447 execute(tc_string_withFloatLength()); //passed ???
2448 execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
2449 execute(tc_string_withEmptyMin());//Passed
2450 execute(tc_string_withNegativeMin());//Passed
2451 execute(tc_string_withPosMax())//Passed
2452 execute(tc_string_withEmptyMax());//Passed
2453 execute(tc_string_withNegativeMax());//Passed
2454 execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
2455 execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
2456 execute(tc_string_withTypeAndBase());//Passed
3abe9331 2457 //TODO: put this test back later
2458 //execute(tc_string_pattern_square_brackets());
970ed795
EL
2459 //===Boolean===
2460 execute(tc_boolean());//Passed
3abe9331 2461 execute(tc_boolean_variant_commented());
970ed795
EL
2462 //===Decimal===
2463 execute(tc_decimal());//Passed
2464 //execute(tc_decimal_withLength()); length not supported
2465 execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
2466 execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
2467 execute(tc_decimal_withEnum()); //Passed,TR HL21196 -solved
3abe9331 2468 execute(tc_decimal_fractiondigits());
970ed795
EL
2469 //===Integer===
2470 execute(tc_integer());//Passed
2471 execute(tc_integer_empty1());//Passed
2472 execute(tc_integer_withEnum()); //Passed, TR:HL21694 -solved
2473 execute(tc_integer_withMinIncl());//Passed
2474 execute(tc_integer_withMaxIncl());//Passed
2475 execute(tc_integer_withMinExcl());//Passed
2476 execute(tc_integer_withMaxExcl());//Passed
2477 //===Time===
2478 execute(tc_time());//passed
2479 execute(tc_time_withEnum());//Passed TR HL22058
2480 //==list===
2481 execute(tc_list_conv()); //Passed
2482 execute(tc_list_encDec());//Passed
2483 execute(tc_integerList());//Passed
3abe9331 2484 execute(tc_list_simpletype());//Passed
2485 //===Float===
2486 execute(tc_float_not_a_number());
970ed795
EL
2487
2488 //===simpleType enum====
2489 execute(tc_simpleType_enum());//Passed
3abe9331 2490 execute(tc_simpleType_restrict_comp());
2491 execute(tc_simpleType_ref());
2492 execute(tc_simpleType_base());
2493 execute(tc_enum_field_names());
970ed795
EL
2494 //===union===
2495 execute(tc_union());//TR:HL23577
2496 execute(tc_union_optional());//CR_TR18883
3abe9331 2497 execute(tc_enumeration_union_restriction());
2498 execute(tc_enumeration_union_restriction2());
2499 execute(tc_enumeration_remove_dup());
970ed795
EL
2500 //===complex===
2501 execute(tc_complex1()); //Passed
2502 execute(tc_complex2());//TR: HL24977
2503 execute(tc_complex_simpleContent());
3abe9331 2504 execute(tc_complex_namespaceas());
970ed795 2505 execute(tc_complex_mixed_conv()); //Passed
3abe9331 2506 execute(tc_complex_group_reference());
970ed795 2507 execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
3abe9331 2508 execute(tc_complex_seq_embeds_seq());
970ed795
EL
2509 execute(tc_complex_choice_converter());//Passed
2510 execute(tc_complex_choice_encDec());//Passed
2511
2512 execute(tc_complex_all_converter());//Passed
2513 execute(tc_complex_all_emptySet_encDec());//Passed
2514 execute(tc_complex_all_fullSet_encDec());//Passed
2515 execute(tc_complex_all_subSet_encDec());//Passed
2516 execute(tc_complex_all_inconsistentSet_encDec());//Passed
2517 execute(tc_complex_all_noOptional_pos_encDec()); //Passed
2518 execute(tc_complex_all_noOptional_neg1_encDec()); //Error, TR: HL32978
2519 execute(tc_complex_all_noOptional_neg2_encDec()); //Failed, TR: HL32978
2520 execute(tc_complex_all_noOptional_neg3_encDec()); //Failed, TR: HL32978
2521 execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
2522 execute(tc_complex_minOccursMaxOccurs()); //Passed, TR (ethgry): HL10386
2523 execute(tc_complex_extension_converter()); //TR HL32505
2524 execute(tc_complex_extension_encDec()); //Passed
3abe9331 2525 execute(tc_complex_extension_name_attrib_convert());
2526 execute(tc_complex_long_extension());
2527 execute(tc_type_name_conversion_follow());
2528 execute(tc_complex_extension_with_attrib());
2529 execute(tc_extension_restriction_with_attrib());
2530 execute(tc_attrib_enum());
2531 execute(tc_complex_self_recursion());
970ed795 2532 execute(tc_complex_restriction_converter()); //Failed, TR HL32896
3abe9331 2533 execute(tc_complex_restriction_with_use());
2534 execute(tc_complex_nillable());
2535 execute(tc_nillable_fixed());
2536 execute(tc_no_ns_connector());
970ed795
EL
2537
2538
2539
3abe9331 2540 //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of
970ed795
EL
2541
2542
2543
2544
2545 execute(tc_complex_restriction_neg1_converter());//TR: HL32948
2546 execute(tc_complex_restriction_neg2_converter());//TR: HL32948
2547 execute(tc_complex_unique_converter());
2548 execute(tc_complex_include_converter());
2549 execute(tc_complex_include_neg1_converter());
2550 execute(tc_complex_import_pos1_converter());
2551 execute(tc_complex_import_pos2_converter());
2552 execute(tc_complex_import_neg1_converter());
2553 execute(tc_complex_import_withSL_converter());//SchemaLocation
3abe9331 2554 execute(tc_complex_import_withSL_encDec());
970ed795
EL
2555 execute(tc_complex_import_nameCollision_converter());
2556 execute(tc_complex_import_nameCollision2_converter());
2557 execute(tc_complex_any_pos_converter());
3abe9331 2558 execute(tc_imported_type_prefix());
970ed795
EL
2559 execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
2560 execute(tc_complex_any_pos2_encDec());
2561 execute(tc_complex_any_pos3_encDec());//failed, TR:
2562 //===element===
2563 execute(tc_element_anyType_converter());//Passed
3abe9331 2564 execute(tc_element_attrib_qualified());
2565 execute(tc_element_attrib_unqualified());
970ed795
EL
2566 execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
2567 execute(tc_element_anyType_attrOnly_encDec());//Passed
2568 execute(tc_element_anyType_2attrOnly_encDec());//Passed
2569 execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
2570 execute(tc_element_anyType_encDec());//Passed, HL29711
2571 execute(tc_element_anyType_deeper_encDec());
2572 execute(tc_element_anyType_longer_encDec());
2573 execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
2574 execute(tc_element_recOfElements_encDec());//Passed
2575 execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
2576 execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
2577 execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
2578 execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
2579 execute(tc_element_recOfElements_anonymousType_conv());
2580 execute(tc_element_recOfElements_anonymousType_encDec());
2581
3abe9331 2582
2583 //===substitutiongroup===
2584 execute(tc_substitutiongroup());
51fa56b9 2585 execute(tc_substitutiongroup_name_as());
3abe9331 2586 execute(tc_substitutiongroup_abstract_block_rest());
2587 execute(tc_substitutiongroup_abstract_block_ext());
2588 execute(tc_substitutiongroup_complex_without_element());
2589 execute(tc_substitutiongroup_long_extension());
51fa56b9 2590 execute(tc_substitutiongroup_complextype_block());
2591 execute(tc_substitutiongroup_notargetnamespace());
3abe9331 2592 execute(tc_substitutiongroup_neg());
2593 execute(tc_substitutiongroup_diff_module());
51fa56b9 2594 execute(tc_substitutiongroup_rename());
2595 execute(tc_substitutiongroup_endDec());
2596
2597 //===type substitution===
2598 execute(tc_type_substitution());
2599 execute(tc_type_substitution_encDec());
2600 execute(tc_type_substitution_chain());
2601 execute(tc_type_substitution_abstract_block());
2602 execute(tc_type_substitution_diff_module());
2603 execute(tc_type_substitution_simpletype());
2604 execute(tc_type_substitution_with_elem_substitution());
2605 execute(tc_type_substitution_element_in_ct());
2606 execute(tc_only_element_substitution());
2607 execute(tc_type_substitution_builtintype());
2608 execute(tc_type_substitution_rename());
3abe9331 2609
2610
2611
970ed795
EL
2612 execute(tc_element_nameInheritance_conv());
2613 execute(tc_element_nameInheritance_encDec());//TR HL49978
2614 execute(tc_element_Tgc_encDec());//TR HL49978
2615 execute(tc_element_abstract_conv()); //Not supported features
2616 execute(tc_element_nillable_converter());
3abe9331 2617 execute(tc_element_nillable_with_annotations());
2618 execute(tc_element_nillable_in_nillable_extension());
2619 execute(tc_element_attributegroup_nillable());
2620 execute(tc_element_attributegroup_ingroup());
970ed795
EL
2621 execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
2622 execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
2623 execute(tc_element_nillable_Isp_nilFalse_encDec());
2624 execute(tc_element_nillable_Isp_nilTrue_encDec());
2625 execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
2626 execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());
2627}
2628
2629} with {
2630 extension "version R1A02"; // a prerelease version
2631 extension "requiresTITAN R1C01";
2632} // end of module
This page took 0.126182 seconds and 5 git commands to generate.