xmlTest_Testcases.ttcn 108 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Elemer Lelik's avatar
Elemer Lelik committed
2
 * Copyright (c) 2000-2016 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
4
5
6
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
Elemer Lelik's avatar
Elemer Lelik committed
7
8
9
10
11
12
13
14
 *
 * Contributors:
 *   Balasko, Jeno
 *   Baranyi, Botond
 *   Ormandi, Matyas
 *   Raduly, Csaba
 *   Szabo, Bence Janos
 *
Elemer Lelik's avatar
Elemer Lelik committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
 ******************************************************************************/

//=========================================================================
// References: (XSD_0)  XML Schema Part 0: Primer Second Edition
//             (XSD_1)  XML Schema Part 1: Structures Second Edition
//             (XSD_2)  XML Schema Part 2: Datatypes Second Edition
//             (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3;
//                      Part 9: Using XML schema with TTCN-3
// Last modified: 2013-12-02 by ethbaat
// Temporarily commented out: tc_complex_import_withSL_encDec fails on some platforms because of TR:HR88527

module xmlTest_Testcases
{

//=========================================================================
// Import Part
//=========================================================================
//import from XSD all;
import from PIPEasp_Types all;
import from PIPEasp_PortType all;
import from PIPEasp_Templates all;
import from xmlTest_Shell all;

import from www_XmlTest_org_element_anyType_e all;
import from www_XmlTest_org_complex_all_e all;
import from www_XmlTest_org_complex_extension_e all;
import from www_XmlTest_org_complex_restriction_e all;
import from www_XmlTest_org_complex_import_e all;
import from www_XmlTest_org_complex_any_e all;

import from xmlTest_Functions_string all;
import from xmlTest_Functions_complex1 all;
import from xmlTest_Functions_complex2 all;
import from xmlTest_Functions_complex all;
import from xmlTest_Functions_element all;
import from xmlTest_Functions_list all;


//=========================================================================
// Module Parameters
//=========================================================================

// Insert module parameters here if applicable!
// You can use the module_param skeleton!

//=========================================================================
// Data Types
//=========================================================================

// Insert data type defintions here if applicable!
// You can use the data_type skeleton!

//=========================================================================
// Signatures
//=========================================================================

// Insert signature definitions here if applicable!
// You can use the signature skeleton!

//=========================================================================
//Port Types
//=========================================================================

// Insert port type defintions here if applicable!
// You can use the port_type skeleton!

//=========================================================================
//Component Types
//=========================================================================

type component xmlTest_CT extends Shell_CT {}

type component mtc_CT {}
//=========================================================================
// Constants
//=========================================================================

//=========================================================================
// Templates
//=========================================================================

// Insert templates here if applicable!
// You can use the template skeleton!

//=========================================================================
// Altsteps
//=========================================================================

// Insert altsteps here if applicable!
// You can use the altstep skeleton!

//=========================================================================
// Functions
//=========================================================================

//=========================================================================
// f_countDelimiters
//=========================================================================
function f_countDelimiters(in charstring pl_string, in charstring pl_delimiter, inout integer pl_counter) {
  pl_counter:=0;
  var integer pos:=0;
  var integer vl_size:=lengthof(pl_string);
  var integer vl_delimsize:=lengthof(pl_delimiter);
  while(pos<vl_size) {
    if( substr(pl_string,pos,vl_delimsize)==pl_delimiter) { pl_counter:=pl_counter+1}
    pos:=pos+1;
  }
}//f_

//=========================================================================
// f_compareFiles
//=========================================================================
//pl_diffLimit: upper limit of acceptable diff lines. 4 means one acceptable difference
function f_compareFiles(in charstring pl_file1, in charstring pl_file2, in integer pl_diffLimit) runs on xmlTest_CT {
  var integer vl_expectedResult:=0
  if(pl_diffLimit>0) { vl_expectedResult:=256; }
  var boolean vl_success:=false;
  f_shell_command("diff -w " & pl_file1  & " " & pl_file2,"",vl_expectedResult,vl_success);

  if(v_ASP_PResult.code==0)
  {
    setverdict(pass);
  }
  else if(v_ASP_PResult.code==256) {
    var integer vl_counter:=0;
    f_countDelimiters(v_ASP_PResult.stdout,"\n",vl_counter);
    log("Counted lines: ",vl_counter, " diffLimit: ", pl_diffLimit)
    if(vl_counter>pl_diffLimit) {
      setverdict(fail);
    }
  } else { //e.g 512: No such file or directory
    log("Wrong result code: ",v_ASP_PResult.code, " Expected result code: ", vl_expectedResult)
    setverdict(fail);
  }
}//f_


//=========================================================================
// Testcases
//=========================================================================
testcase tc_versionTest() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("compiler -v","",0)
}

testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
{
162
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",0)
Elemer Lelik's avatar
Elemer Lelik committed
163
164
165
166
167
}

//simple records
testcase tc_firstTrial() runs on xmlTest_CT
{
168
  f_shellCommandWithVerdict(xsd2ttcn_command & " elements.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
169
170
171
172
173

  if(getverdict==pass) {
    f_compareFiles(
      "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff_headerAndModuleName);
  }
Elemer Lelik's avatar
Elemer Lelik committed
174
175
176
177
178
179
}

// see http://www.w3.org/TR/xmlschema-0/ 2.1 The Purchase Order Schema
// This tc is "passed" but it is generated into noTargetNaespace.ttcn
testcase tc_secondTrial() runs on xmlTest_CT
{
180
  f_shellCommandWithVerdict(xsd2ttcn_command & " po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
181
182
183
184
185

  if(getverdict==pass) {
    f_compareFiles(
      "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff_headerAndModuleName);
  }
Elemer Lelik's avatar
Elemer Lelik committed
186
187
188
}
testcase tc_empty() runs on xmlTest_CT
{
189
  f_shellCommandWithVerdict(xsd2ttcn_command & " empty.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
190
191
192
193
194
195
196
197
198

  if(getverdict==pass) {
    f_compareFiles(
      "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff_headerAndModuleName);
  }
}

testcase tc_annotation() runs on xmlTest_CT
{
199
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
200
201
202
203
204
205
206
207
  if(getverdict==pass) {
      f_compareFiles(
      "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
}

testcase tc_annotation1() runs on xmlTest_CT
{
208
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
209
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
210
211
212
213
}

testcase tc_annotation2() runs on xmlTest_CT
{
214
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation2.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
215
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
216
217
}

Elemer Lelik's avatar
Elemer Lelik committed
218
219
testcase tc_xml_in_annotation() runs on xmlTest_CT
{
220
  f_shellCommandWithVerdict(xsd2ttcn_command & " xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
221
222
223
224
225
226
  if(getverdict==pass) {
      f_compareFiles(
      "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
}

Elemer Lelik's avatar
Elemer Lelik committed
227
//Incorrect version: 1.1, libxml parser prints warning
Elemer Lelik's avatar
Elemer Lelik committed
228
229
testcase tc_version() runs on xmlTest_CT
{
230
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_version.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
}

//************************************
// === Converter switch tests: ===
//************************************
// usage: xsd2ttcn [-cepstVwx] [-f file] schema.xsd ...
//         or xsd2ttcn -v
//
// OPTIONS:
//         -c:             disable the generation of comments in TTCN-3 modules
//         -e:             disable the generation of encoding instructions in TTCN-3 modules
//         -f file:        the XSD files are taken from file instead of the command line
//         -p:             do not generate the UsefulTtcn3Types and XSD predefined modules
//         -q:             quiet - disable the issue of status messages
//         -s:             parse and validate only - no TTCN-3 module generation
//         -t:             disable the generation of timing information in TTCN-3 modules
//         -v:             show version information
//         -w:             suppress warnings
//         -x:             disable schema validation but generate TTCN-3 modules

//TODO:Not ready yet
testcase tc_options_c() runs on xmlTest_CT
{
254
  f_shellCommandWithVerdict(xsd2ttcn_command & " -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
255
256
257
258
259
260
261
262
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

//         -e:             disable the generation of encoding instructions in TTCN-3 modules
testcase tc_options_e() runs on xmlTest_CT
{
263
  f_shellCommandWithVerdict(xsd2ttcn_command & " -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
264
265
266
267
268
269
270
271
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

//         -f file:        the XSD files are taken from file instead of the command line
testcase tc_options_f() runs on xmlTest_CT
{
272
  f_shellCommandWithVerdict(xsd2ttcn_command & " -f XmlTest_files1.txt","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
273
274
275
276
277
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
278
279
testcase tc_options_g() runs on xmlTest_CT
{
280
  f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
281
282
283
284
285
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }

286
  f_shellCommandWithVerdict(xsd2ttcn_command & " generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
287
288
289
290
291
292
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff_headerModNameAndNamespace);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
293
294
295
296
297
298
299
//-p: do not generate the UsefulTtcn3Types and XSD predefined modules
testcase tc_options_p() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn  tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv XSD.ttcn  tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );

300
  f_shellCommandWithVerdict(xsd2ttcn_command & " -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
  if(getverdict==pass) {
    f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "",c_shell_successWithoutWarningAndError);
    f_shellCommandWithVerdict("ls  XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
  }

  f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn  www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_XSD.ttcn  XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
}

//-s: parse and validate only - no TTCN-3 module generation
testcase tc_options_s() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("mv www_XmlTest_org_annotation.ttcn  tmp_www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv XSD.ttcn  tmp_XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv UsefulTtcn3Types.ttcn tmp_UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );

319
  f_shellCommandWithVerdict(xsd2ttcn_command & " -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
  //TODO:test if wrong xsd causes conversion error wit this switch

  //test if www_XmlTest_org_annotation.ttcn.ttcn, XSD.ttcn and UsefulTtcn3Types.ttcn exist:
  if(getverdict==pass) {
    f_shellCommandWithVerdict("ls www_XmlTest_org_annotation.ttcn", "", c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  XSD.ttcn", "",c_shell_error_noSuchFileOrDirectory );
    f_shellCommandWithVerdict("ls  UsefulTtcn3Types.ttcn.ttcn","", c_shell_error_noSuchFileOrDirectory );
  }
  f_shellCommandWithVerdict("mv tmp_www_XmlTest_org_annotation.ttcn  www_XmlTest_org_annotation.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_XSD.ttcn  XSD.ttcn","",c_shell_successWithoutWarningAndError );
  f_shellCommandWithVerdict("mv tmp_UsefulTtcn3Types.ttcn UsefulTtcn3Types.ttcn","",c_shell_successWithoutWarningAndError );
}

//Ready
//         -t:             disable the generation of timing information in TTCN-3 modules
testcase tc_options_t() runs on xmlTest_CT
{
337
  f_shellCommandWithVerdict(xsd2ttcn_command & " -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
338
  if(getverdict==pass) {
Elemer Lelik's avatar
Elemer Lelik committed
339
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_headerAndModuleName);
Elemer Lelik's avatar
Elemer Lelik committed
340
341
342
343
344
345
346
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
347
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
348
349
350
351
352
353
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
354
  f_shellCommandWithVerdict(xsd2ttcn_command & " -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
355
356
357
358
359
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
360
  f_shellCommandWithVerdict(xsd2ttcn_command & " -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
361
362
363
364
365
366
}

//TODO:Not ready yet
//         -x:             disable schema validation but generate TTCN-3 modules
testcase tc_options_x() runs on xmlTest_CT
{
367
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
368
369
370
371
}

testcase tc_options_wrong() runs on xmlTest_CT
{
372
  f_shellCommandWithVerdict(xsd2ttcn_command & " -H XmlTest_annotation.xsd","", c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
373
374
375
376
}

testcase tc_options_missing() runs on xmlTest_CT
{
377
  f_shellCommandWithVerdict("xsd2ttcn","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
378
379
380
381
382
383
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
384
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
385
386
387
388
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
389
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
390
391
392
393
394
395
396
397
398
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
399
    f_shellCommandWithVerdict(xsd2ttcn_command & " all.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
400
401
402
403
404
405
406
407
    if(getverdict==pass) {
      f_compareFiles(
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
408
    f_shellCommandWithVerdict(xsd2ttcn_command & " element_in_all_minmax.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
409
410
411
412
413
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
414
    f_shellCommandWithVerdict(xsd2ttcn_command & " any_anyAttribute.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
415
416
417
418
419

    if(getverdict==pass) {
      f_compareFiles(
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
    }
Elemer Lelik's avatar
Elemer Lelik committed
420
421
422
423
424
425
426
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
427
  f_shellCommandWithVerdict(xsd2ttcn_command & " HQ73011.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
428
429
430
431
432
433
    if(getverdict==pass) {
      f_compareFiles(
        "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
434
435
  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
436
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
437
438
439
440
441
442
443
444
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
445
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
446
447
448
449
450
451
452
453
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_anyattribute_in_complex() runs on xmlTest_CT
  {
454
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
455
456
457
458
459
460
461
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
462
463
464
  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
465
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
466
467
468
469
470

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
Elemer Lelik's avatar
Elemer Lelik committed
471
472
473
474
475
  }

  //double schema definition - Validator Returns with Error, Passed
  testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
  {
476
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_use_noTNS.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
477
478
  }

Elemer Lelik's avatar
Elemer Lelik committed
479
480
  testcase tc_id_attribute() runs on xmlTest_CT
  {
481
    f_shellCommandWithVerdict(xsd2ttcn_command & " id_attrib.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
482
483
484
485
486
487
488
489
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
490
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
491
492
493
494
495
496
497
498
499
500
501
502
503
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
504
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
505
506
507
508
509
510
511
512
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
513
    f_shellCommandWithVerdict(xsd2ttcn_command & " imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
514
515
516
517
518
519
520
521
522
523
524
525
526

    if(getverdict==pass) {
      f_compareFiles(
        "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
527
    f_shellCommandWithVerdict(xsd2ttcn_command & " module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
528
529
530
531
532
533
534
535
536
537
538
539
540
541

    if(getverdict==pass) {
      f_compareFiles(
        "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff_headerAndModuleName);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
542
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_remove_seq_of_low_line.xsd","",
Elemer Lelik's avatar
Elemer Lelik committed
543
544
545
546
547
548
549
550
551
552
                              c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv3_e.ttcn",
        "http_www_example_org_name_conv3.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
553
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
554
555
556
557
558
559
560
561
562
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
        "www_example_org_name_conv_http.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
563
    f_shellCommandWithVerdict(xsd2ttcn_command & " comment_placement.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
564
565
566
567
568
569
570
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
        "www_example_org_comment_placement.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
}//group

//************************************
//   Testcases based on W3C standards
//************************************

//******************************
//    StringTest
//******************************
group StringTest {

  //=== Correct string type definitions: ====
  //TR HL21086 - whitespace preserve. TODO: standalone testcase
  testcase tc_string() runs on xmlTest_CT
  {
586
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string.ttcn",
        "www_XmlTest_org_string_e.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
////////////////////////////////////////////
//
//    f_encDecTest_NameA();
//    f_encDecTest_NameB();
//    f_encDecTest_Non_empty_string();
//    f_encDecTest_Type();
//
////////////////////////////////////////////
  }

  //Passed, TR: Hl21086 - Solved
  testcase tc_string_withWhitespace() runs on xmlTest_CT
  {
605
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
606
607
608
609
610
611
612
613
614
615
616
617
618
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withWhitespace.ttcn",
        "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
    f_encDecTest_StringWhiteSpaceP();
    f_encDecTest_StringWhiteSpaceR();
    f_encDecTest_StringWhiteSpaceC();
  }

  //Passed, TR: HL26227 -Solved BUT rethink if variant part is well ordered or not!!
  testcase tc_string_withEnum() runs on xmlTest_CT
  {
619
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withEnum.ttcn",
        "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
    f_encDecTest_StringEnum();
  }
  //TODO: Write length of child restriction tests based on tc_string!!!

  //=== Length restriction tests ===



  //=== Faulty String definitions: =========

  //===length===
  //TR: HL21257 --Solved
  testcase tc_string_withPosLength() runs on xmlTest_CT
  {
639
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
640
641
642
643
644
645
646
647
648
649
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosLength.ttcn",
        "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
650
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
651
652
653
654
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
655
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
656
657
658
659
660
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
661
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFixedLength.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
662
663
664
665
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
666
    f_shellCommandWithVerdict(xsd2ttcn_command & " fixed_value.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
667
668
669
670
671
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
Elemer Lelik's avatar
Elemer Lelik committed
672
673
674
675
676
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
677
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFloatLength.xsd","", c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
678
679
680
681
682
683
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
684
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
685
686
687
688
689
690
691
692
693
694
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
695
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
696
697
698
699
700
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
701
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
702
703
704
705
706
707
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
708
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
709
710
711
712
713
714
715
716
717
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
718
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
719
720
721
722
723
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
724
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
725
726
727
728
729
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
730
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
731
732
733
734
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
735
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
736
737
738
739
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
740
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
741
  }
Elemer Lelik's avatar
Elemer Lelik committed
742
743
744

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
745
  //  f_shellCommandWithVerdict(xsd2ttcn_command & " regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
746
747
748
749
750
  //  if(getverdict==pass) {
  //    f_compareFiles(
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff_headerAndModuleName);
  //  }
  //}
Elemer Lelik's avatar
Elemer Lelik committed
751
752
753
754
755
756
757
758
759
}//StringTest

//******************************
//    BooleanTest
//******************************
group BooleanTest {

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
760
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
761
762
763
764
765
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
766
767

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
768
    f_shellCommandWithVerdict(xsd2ttcn_command & "  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
769
770
771
772
773
774
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
775
776
777
778
779
780
781
782
783
784
}//BooleanTest


//******************************
//    DecimalTest
//******************************
group DecimalTest {

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
785
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
786
787
788
789
790
791
792
793
794
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
795
  //     f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
796
797
798
799
800
801
802
803
804
805
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff_headerAndModuleName);
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
806
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
807
808
809
810
811
812
813
814
815
816

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
        "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
817
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
818
819
820
821
822
823
824
825
826
827

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
        "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
828
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
829
830
831
832
833
834
835

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
836
837

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
838
    f_shellCommandWithVerdict(xsd2ttcn_command & "  decimal_fractiondigits.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
839
840
841
842
843
844
845

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
846
847
848
849
850
851
852
853
854
}//DecimalTest

//******************************
//    IntegerTest
//    Based on (XSD_2)/3.3.13 and (ETSI_9)/6.1/Table1
//******************************
group IntegerTest {

  testcase tc_integer() runs on xmlTest_CT {
855
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
856
857
858
859
860
861
862
863
864
865
866

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_e.ttcn",
        "www_XmlTest_org_integer.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
867
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_empty1.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
868
869
870
871
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
872
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
873
874
875
876
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
877
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
878
879
880
881
882
883
884
885
886

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
887
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
888
889
890
891
892
893
894
895
896
897

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinIncl_e.ttcn",
        "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
898
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
899
900
901
902
903
904
905
906
907

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
908
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
909
910
911
912
913
914
915
916
917
918

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinExcl_e.ttcn",
        "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
919
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
920
921
922
923
924
925
926
927
928
929

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_


}//IntegerTest

Elemer Lelik's avatar
Elemer Lelik committed
930
931

  testcase tc_float_not_a_number() runs on xmlTest_CT {
932
    f_shellCommandWithVerdict(xsd2ttcn_command & "  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
933
934
935
936
937
938
939
940

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
        "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
941
942
943
  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

944
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
945
946
947
948
949
950
951
952

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
953
954
  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

955
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
956
957
958
959
960
961
962
963
964
965

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

966
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
967
968
969
970
971
972
973
974
975
976

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

977
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
978
979
980
981
982
983
984
985
986
987
988

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

989
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
990
991
992
993
994
995
996
997

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
998
999
  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

1000
    f_shellCommandWithVerdict(xsd2ttcn_command & "  attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1001
1002
1003
1004
1005
1006
1007

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1008
1009
1010
1011
1012
1013
1014
1015
1016

//******************************
//    TimeTest
//    Based on (XSD_2)/
//******************************
group TimeTest {

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
1017
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1018
1019
1020
1021
1022
1023
1024
1025
1026

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
1027
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_
}//TimeTest

group ListTest {
  //converter
  testcase tc_list_conv() runs on xmlTest_CT {

1040
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff_headerAndModuleName);
    }

    // restrictions:length, minLength, maxLength, pattern, and  enumeration.
  }//tc_

  testcase tc_list_encDec() runs on xmlTest_CT {
    f_encDecTest_StringList();
  }//tc_

  testcase tc_integerList() runs on xmlTest_CT {

1056
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1057
1058
1059
1060
1061
1062
1063

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1064
1065
1066

  testcase tc_list_simpletype() runs on xmlTest_CT {

1067
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1068
1069
1070
1071
1072
1073
1074

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
ebensza's avatar
ebensza committed
1075
1076
1077

  testcase tc_list_complextype() runs on xmlTest_CT {

1078
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_complextype.xsd","",c_shell_successWithoutWarningAndError)
ebensza's avatar
ebensza committed
1079
1080
1081
1082
1083
1084
1085

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff_headerAndModuleName);
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1086
1087
1088
1089
1090
1091
}//ListTest

group UnionTest {
  //TR:HL23577
  testcase tc_union() runs on xmlTest_CT {

1092
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1093
1094
1095
1096
1097
1098
1099
1100
1101

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_
  
  testcase tc_union_optional() runs on xmlTest_CT {

1102
    f_shellCommandWithVerdict(xsd2ttcn_command & "  ETSI_CR5852_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1103
1104
1105
1106
1107
1108
1109

    if(getverdict==pass) {
      f_compareFiles(
        "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1110
1111
 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

1112
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction_e.ttcn",
        "www_example_org_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

1123
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1124
1125
1126
1127
1128
1129
1130
1131

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_seq_enumeration_restriction_e.ttcn",
        "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

1132
1133
 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

1134
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction3.xsd","",c_shell_successWithoutWarningAndError)
1135
1136
1137
1138
1139
1140
1141
1142
1143

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction3_e.ttcn",
        "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
1144
1145
 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

1146
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_remove_dup.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1147
1148
1149
1150
1151
1152
1153
1154

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_remove_dup_e.ttcn",
        "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1155
1156
1157
1158
1159
1160
1161
1162
}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

1163
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff_headerModNameAndNamespace);
       f_encDecTest_InternationalPrice();
     }
  }//tc_

  //TR: HL24977 -Solved
  testcase tc_complex2() runs on xmlTest_CT {

1175
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
    f_encDecTest_InternationalPrice2(); //TR: HL24977 -solved -Primer, 2.5.3 Empty Content
    f_encDecTest_InternationalPrice3();
    f_encDecTest_InternationalPrice4();
  }//tc_

  testcase tc_complex_simpleContent() runs on xmlTest_CT {

1188
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff_headerModNameAndNamespace);
      f_encDecTest_ComplexTypeWithSimpleContent1();
      f_encDecTest_ComplexTypeWithSimpleContent2();
      f_encDecTest_ComplexTypeWithSimpleContent2_neg();
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1199
1200
  testcase tc_complex_namespaceas() runs on xmlTest_CT {

1201
    f_shellCommandWithVerdict(xsd2ttcn_command & " namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1202
1203
1204
1205
1206
1207
1208
1209
1210

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff_headerAndModuleName);
       f_compareFiles(
        "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1211
1212
  testcase tc_complex_mixed_conv() runs on xmlTest_CT {

1213
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_mixed.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1214
1215
1216
1217
1218
1219
1220

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_mixed_e.ttcn","www_XmlTest_org_complex_mixed.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1221
1222
  testcase tc_complex_group_reference() runs on xmlTest_CT {

1223
    f_shellCommandWithVerdict(xsd2ttcn_command & "  seq_group_reference.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1224
1225
1226
1227
1228
1229
1230

     if(getverdict==pass) {
       f_compareFiles(
        "www_example_org_seq_group_reference_e.ttcn","www_example_org_seq_group_reference.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1231
1232
1233
1234
1235
  //TR:HL29258
  testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
     f_encDecTest_ComplexTypeWithMixed();
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1236
1237
 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {

1238
    f_shellCommandWithVerdict(xsd2ttcn_command & "  sequence_embeds_sequence.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1239
1240
1241
1242
1243
1244
1245

     if(getverdict==pass) {
       f_compareFiles(
        "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff_headerModNameAndNamespace);
       f_encDecTest_InternationalPrice();
     }
  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1246
1247
1248

  testcase tc_complex_choice_converter() runs on xmlTest_CT {

1249
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_choice.xsd","",c_shell_successWithWarning)
Elemer Lelik's avatar
Elemer Lelik committed
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }//tc_

  //
  testcase tc_complex_choice_encDec() runs on xmlTest_CT {
    f_encDecTest_ComplexTypeWithChoice_1();
    f_encDecTest_ComplexTypeWithChoice_2();
    f_encDecTest_ComplexTypeWithChoice_3();
    f_encDecTest_ComplexTypeWithChoice_4();
    f_encDecTest_ComplexTypeWithChoice_5();
    f_encDecTest_ComplexTypeWithChoice_6();
    f_encDecTest_ComplexTypeWithChoice_7();
    f_encDecTest_ComplexTypeWithChoice_8();
    f_encDecTest_ComplexTypeWithChoice_9();
    f_encDecTest_ComplexTypeWithChoice_10();
  }//tc_

  //Passed, TR: HL30830 -solved
  testcase tc_complex_all_converter() runs on xmlTest_CT {
1273
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  //HL29679
  testcase tc_complex_all_emptySet_encDec() runs on xmlTest_CT {
    var MySubjects1 vl_pdu:= {
      order:={},
      year:="2009",
      english:=omit,
      math:=omit,
      physics:=omit,
      chemistry:=omit
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects1 Year='2009'/>\n\n";
    f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_fullSet_encDec() runs on xmlTest_CT {
    var  MySubjects1 vl_pdu:= {
      order:={math,english,chemistry, physics},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
    }
    var charstring vl_expectedEncodedPdu:=
      "<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"
    f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_subSet_encDec() runs on xmlTest_CT {
    var  MySubjects1 vl_pdu:= {
      order:={math,english,chemistry},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:=omit,
      chemistry:="CH2"
    },
    vl_expectedPdu:={
      order:={math,english},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:=omit,
      chemistry:=omit
    };
    var charstring vl_expectedEncodedPdu:=
      "<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"
      f_encDecTest_ComplexTypeWithAll_MySubject1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_complex_all_inconsistentSet_encDec() runs on xmlTest_CT {
    f_encDecTest_ComplexTypeWithAll_inconsistentSet();
  }//tc_

  //positive testcase for group "all". The type has no optional field (element).The input is correct
  testcase tc_complex_all_noOptional_pos_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1338
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1339
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1340
1341
1342
1343
1344
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
    }
    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>H1</History>\n</MySubjects2>\n\n";
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,0);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of one field (history) is missing
  //Passed, TR: HL32978
  testcase tc_complex_all_noOptional_neg1_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1356
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1357
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1358
1359
1360
1361
1362
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1363
1364
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1365
      order:={math,english,chemistry, physics,history},
Elemer Lelik's avatar
Elemer Lelik committed
1366
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1367
1368
1369
1370
1371
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
Elemer Lelik's avatar
Elemer Lelik committed
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
    }
    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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,0);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of one field (history) and its place in order-list is missing.
  // ***Less elements of record of order than required***
  //expectation: error report at encoding, returning 1 at decoding
  //Passed, TR: HL32978
  testcase tc_complex_all_noOptional_neg2_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1384
      order:={math,english,chemistry, physics},
Elemer Lelik's avatar
Elemer Lelik committed
1385
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1386
1387
1388
1389
1390
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1391
1392
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1393
      order:={math,english,chemistry, physics},
Elemer Lelik's avatar
Elemer Lelik committed
1394
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1395
1396
1397
1398
1399
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
Elemer Lelik's avatar
Elemer Lelik committed
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      //"<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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu,1);
  }//tc_

  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: order three times contains "math", Physics and history are missing.
  //expectation: error report at encoding,  returning 1 at decoding
  //Passed,  TR: HL32978
  testcase tc_complex_all_noOptional_neg3_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1412
      order:={math,english,chemistry,math,math},
Elemer Lelik's avatar
Elemer Lelik committed
1413
      year:="2009",
Elemer Lelik's avatar
Elemer Lelik committed
1414
1415
1416
1417
1418
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      //"<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"
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
  }//tc_


  //=========================================================================
  //  tc_complex_all_noOptional_empty_encDec
  //=========================================================================
  //Negative testcase for group "all". The type has no optional field (element).
  //The input is not correct: value of all the fields and their place in order-list is missing
  //expectation: error report at encoding
  //Passed,  TR: HL32978
  testcase tc_complex_all_noOptional_empty_encDec() runs on xmlTest_CT {
    var  MySubjects2 vl_pdu:= {
Elemer Lelik's avatar
Elemer Lelik committed
1435
1436
1437
1438
1439
1440
1441
      order:={ },
      year:="2009"
      //english:="Advanced Group 1",
      //math:="Beginners 1",
      //physics:="Mechanics 1",
      //chemistry:="CH2"
      //history:="H1"
Elemer Lelik's avatar
Elemer Lelik committed
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
    }
    var charstring vl_expectedEncodedPdu:="<MySubjects2 Year='2009'/>\n\n"; //expecting error report!!!
      f_encDecTest_ComplexTypeWithAll_MySubject2(vl_pdu,vl_expectedEncodedPdu,vl_pdu,1);
  }//tc_

  //=========================================================================
  //  tc_complex_minOccursMaxOccurs
  //=========================================================================
  //Old name: tc_XmlTest_minOccursMaxOccurs
  ////TR (ethgry): HL10386
  testcase tc_complex_minOccursMaxOccurs() runs on xmlTest_CT
  {
1454
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
1455
1456
1457
1458
1459
1460
1461
1462
    if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff_headerAndModuleName);
     }
  }


  testcase tc_complex_extension_converter() runs on xmlTest_CT {
1463
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1464
1465
1466
1467
1468
1469
1470

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_extension_e.ttcn","www_XmlTest_org_complex_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1471
  testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
1472
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1473
1474
1475
1476
1477
1478
1479
1480

    if(getverdict==pass) {
      f_compareFiles(
        "name_conversion_extension_attrib_e.ttcn","name_conversion_extension_attrib.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_long_extension() runs on xmlTest_CT {
1481
    f_shellCommandWithVerdict(xsd2ttcn_command & " long_extension.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1482
1483
1484
1485
1486
1487
1488
1489

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_long_extension_e.ttcn","www_example_org_long_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_self_recursion() runs on xmlTest_CT {
1490
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1491
1492
1493
1494
1495
1496
1497
1498

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_self_recursion_e.ttcn","www_example_org_self_recursion.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
1499
    f_shellCommandWithVerdict(xsd2ttcn_command & " type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1500
1501
1502
1503
1504
1505
1506
1507

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_conversion_follow_e.ttcn","www_example_org_type_conversion_follow.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
1508
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1509
1510
1511
1512
1513
1514
1515
1516

    if(getverdict==pass) {
      f_compareFiles(
        "attribute_in_extension_e.ttcn","attribute_in_extension.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
1517
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1518
1519
1520
1521
1522
1523
1524
1525

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attr_ext_rest_e.ttcn","www_example_org_attr_ext_rest.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

  testcase tc_attrib_enum() runs on xmlTest_CT {
1526
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_enum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1527
1528
1529
1530
1531
1532
1533

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_enum_e.ttcn","www_example_org_attrib_enum.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
  testcase tc_complex_extension_encDec() runs on xmlTest_CT
  {
    var MySubjects3Extension vl_pdu:={
      semester:="Autumn",
      year:="2009",
      english:="B1",
      math:=omit,
      physics:="Optics",
      chemistry:=omit,
      arts:="Impressionism"
    }
    var charstring vl_expectedEncodedPdu:=
      "<MySubjects3Extension Semester='Autumn' Year='2009'>\n\t<English>B1</English>\n\t<Physics>Optics</Physics>\n\t<Arts>Impressionism</Arts>\n</MySubjects3Extension>\n\n";
    f_encDecTest_ComplexTypeWithExtension_MySubject3(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }

  testcase tc_complex_restriction_converter() runs on xmlTest_CT {
1551
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1552
1553
1554
1555
1556
1557
1558

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_restriction_e.ttcn","www_XmlTest_org_complex_restriction.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1559
 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
1560
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1561
1562
1563
1564
1565
1566
1567
1568
1569

    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_complex_restriction_with_use_e.ttcn",
         "http_www_example_org_complex_restriction_with_use.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 testcase tc_complex_nillable() runs on xmlTest_CT {
1570
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_nillable.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_complex_nillable_e.ttcn",
         "www_example_org_complex_nillable.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
 testcase tc_nillable_fixed() runs on xmlTest_CT {
1581
    f_shellCommandWithVerdict(xsd2ttcn_command & " nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1582
1583
1584
1585
1586
1587
1588
1589
1590

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_nillable_fixed_e.ttcn",
         "www_example_org_nillable_fixed.ttcn", c_numOfDiff_headerAndModuleName);
    }
  }//tc_

 testcase tc_no_ns_connector() runs on xmlTest_CT {
1591
    f_shellCommandWithVerdict(xsd2ttcn_command & " no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1592
1593
1594
1595
1596
1597
1598
1599

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_no_ns_connector_e.ttcn",
         "www_example_org_no_ns_connector.ttcn", c_numOfDiff_headerModNameAndNamespace);
    }
  }//tc_