xmlTest_Testcases.ttcn 111 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Adam Knapp's avatar
Adam Knapp committed
2
 * Copyright (c) 2000-2021 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v2.0
Elemer Lelik's avatar
Elemer Lelik committed
5
 * which accompanies this distribution, and is available at
6
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.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
 ******************************************************************************/

//=========================================================================
// 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;

38
39
40
41
42
43
import from www_XmlTest_org_element_anyType all;
import from www_XmlTest_org_complex_all all;
import from www_XmlTest_org_complex_extension all;
import from www_XmlTest_org_complex_restriction all;
import from www_XmlTest_org_complex_import all;
import from www_XmlTest_org_complex_any all;
Elemer Lelik's avatar
Elemer Lelik committed
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

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 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
//=========================================================================

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

testcase tc_xsd2ttcn_versionTest() runs on xmlTest_CT
{
118
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",0)
Elemer Lelik's avatar
Elemer Lelik committed
119
120
121
122
123
}

//simple records
testcase tc_firstTrial() runs on xmlTest_CT
{
124
  f_shellCommandWithVerdict(xsd2ttcn_command & " elements.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
125
126
127

  if(getverdict==pass) {
    f_compareFiles(
128
      "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
129
  }
Elemer Lelik's avatar
Elemer Lelik committed
130
131
132
133
134
135
}

// 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
{
136
  f_shellCommandWithVerdict(xsd2ttcn_command & " po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
137
138
139

  if(getverdict==pass) {
    f_compareFiles(
140
      "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
141
  }
Elemer Lelik's avatar
Elemer Lelik committed
142
143
144
}
testcase tc_empty() runs on xmlTest_CT
{
145
  f_shellCommandWithVerdict(xsd2ttcn_command & " empty.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
146
147
148

  if(getverdict==pass) {
    f_compareFiles(
149
      "www_XmlTest_org_empty_e.ttcn","www_XmlTest_org_empty.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
150
151
152
153
154
  }
}

testcase tc_annotation() runs on xmlTest_CT
{
155
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
156
157
  if(getverdict==pass) {
      f_compareFiles(
158
      "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
159
160
161
162
163
    }
}

testcase tc_annotation1() runs on xmlTest_CT
{
164
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
165
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
Elemer Lelik's avatar
Elemer Lelik committed
166
167
168
169
}

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

Elemer Lelik's avatar
Elemer Lelik committed
174
175
testcase tc_xml_in_annotation() runs on xmlTest_CT
{
176
  f_shellCommandWithVerdict(xsd2ttcn_command & " xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
177
178
  if(getverdict==pass) {
      f_compareFiles(
179
      "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
180
181
182
    }
}

Elemer Lelik's avatar
Elemer Lelik committed
183
//Incorrect version: 1.1, libxml parser prints warning
Elemer Lelik's avatar
Elemer Lelik committed
184
185
testcase tc_version() runs on xmlTest_CT
{
186
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_version.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
}

//************************************
// === 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
{
210
  f_shellCommandWithVerdict(xsd2ttcn_command & " -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
211
  if(getverdict==pass) {
212
    f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
213
214
215
216
217
218
  }
}

//         -e:             disable the generation of encoding instructions in TTCN-3 modules
testcase tc_options_e() runs on xmlTest_CT
{
219
  f_shellCommandWithVerdict(xsd2ttcn_command & " -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
220
  if(getverdict==pass) {
221
    f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
222
223
224
225
226
227
  }
}

//         -f file:        the XSD files are taken from file instead of the command line
testcase tc_options_f() runs on xmlTest_CT
{
228
  f_shellCommandWithVerdict(xsd2ttcn_command & " -f XmlTest_files1.txt","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
229
  if(getverdict==pass) {
230
    f_compareFiles("www_XmlTest_org_annotation2_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
231
232
233
  }
}

234
235
236
237
238
239
240
241
242
//         -J file:        the XSD files are taken from file instead of the command line
testcase tc_options_J() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -J XmlTest_files1.txt","",c_shell_successWithWarning );
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation2_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
243
244
testcase tc_options_g() runs on xmlTest_CT
{
245
  f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
246
247
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
248
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
249
250
  }

251
  f_shellCommandWithVerdict(xsd2ttcn_command & " generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
252
253
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
254
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
255
256
257
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
258
259
260
261
262
263
264
//-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 );

265
  f_shellCommandWithVerdict(xsd2ttcn_command & " -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
  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 );

284
  f_shellCommandWithVerdict(xsd2ttcn_command & " -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
  //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
{
302
  f_shellCommandWithVerdict(xsd2ttcn_command & " -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
Elemer Lelik's avatar
Elemer Lelik committed
303
  if(getverdict==pass) {
304
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
Elemer Lelik's avatar
Elemer Lelik committed
305
306
307
308
309
310
311
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
312
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
313
314
315
316
317
318
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
319
  f_shellCommandWithVerdict(xsd2ttcn_command & " -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
320
321
322
323
324
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
325
  f_shellCommandWithVerdict(xsd2ttcn_command & " -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
326
327
328
329
330
331
}

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

testcase tc_options_wrong() runs on xmlTest_CT
{
337
  f_shellCommandWithVerdict(xsd2ttcn_command & " -H XmlTest_annotation.xsd","", c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
338
339
340
341
}

testcase tc_options_missing() runs on xmlTest_CT
{
342
  f_shellCommandWithVerdict("xsd2ttcn","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
343
344
345
346
347
348
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
349
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
350
351
352
353
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
354
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
Elemer Lelik's avatar
Elemer Lelik committed
355
356
357
358
359
360
361
362
363
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
364
    f_shellCommandWithVerdict(xsd2ttcn_command & " all.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
365
366
    if(getverdict==pass) {
      f_compareFiles(
367
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
368
369
370
371
372
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
373
    f_shellCommandWithVerdict(xsd2ttcn_command & " element_in_all_minmax.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
374
375
376
377
378
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
379
    f_shellCommandWithVerdict(xsd2ttcn_command & " any_anyAttribute.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
380
381
382

    if(getverdict==pass) {
      f_compareFiles(
383
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
384
    }
Elemer Lelik's avatar
Elemer Lelik committed
385
386
387
388
389
390
391
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
392
  f_shellCommandWithVerdict(xsd2ttcn_command & " HQ73011.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
393
394
    if(getverdict==pass) {
      f_compareFiles(
395
        "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
396
397
398
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
399
400
  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
401
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
402
403
    if(getverdict==pass) {
      f_compareFiles(
404
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
405
406
407
408
409
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
410
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
411
412
    if(getverdict==pass) {
      f_compareFiles(
413
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
414
415
416
417
418
    }
  }

  testcase tc_anyattribute_in_complex() runs on xmlTest_CT
  {
419
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
420
421
    if(getverdict==pass) {
      f_compareFiles(
422
        "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
423
424
425
426
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
427
428
429
  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
430
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributeGroup.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
431
432
433

    if(getverdict==pass) {
      f_compareFiles(
434
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
435
    }
Elemer Lelik's avatar
Elemer Lelik committed
436
437
438
439
440
  }

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

Elemer Lelik's avatar
Elemer Lelik committed
444
445
  testcase tc_id_attribute() runs on xmlTest_CT
  {
446
    f_shellCommandWithVerdict(xsd2ttcn_command & " id_attrib.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
447
448
    if(getverdict==pass) {
      f_compareFiles(
449
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
450
451
452
453
454
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
455
    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
456
457
    if(getverdict==pass) {
      f_compareFiles(
458
        "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff+1); // +1: imported module
Elemer Lelik's avatar
Elemer Lelik committed
459
460
461
462
    }

    if(getverdict==pass) {
      f_compareFiles(
463
        "www_example_org_attrib_order_b_e.ttcn", "www_example_org_attrib_order_b.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
464
465
466
    }
  }

467
468
469
470
471
472
473
474
475
  testcase tc_attribute_rename() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_rename.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attribute_rename_e.ttcn", "www_example_org_attribute_rename.ttcn", c_numOfDiff);
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
476
477
  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
478
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
479
480
481
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
482
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
483
484
485
486
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
487
    f_shellCommandWithVerdict(xsd2ttcn_command & " imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
488
489
490

    if(getverdict==pass) {
      f_compareFiles(
491
        "imported_module_e.ttcn","imported_module.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
492
493
494
495
    }

    if(getverdict==pass) {
      f_compareFiles(
496
        "imported_module_1_e.ttcn","imported_module_1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
497
498
499
500
    }
  }//tc_

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
501
    f_shellCommandWithVerdict(xsd2ttcn_command & " module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
502
503
504

    if(getverdict==pass) {
      f_compareFiles(
505
        "module_typename_conversion_e.ttcn","module_typename_conversion.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
506
507
508
509
    }

    if(getverdict==pass) {
      f_compareFiles(
510
        "MyTypes_e.ttcn","MyTypes.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
511
512
513
514
515
    }
  }//tc_

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
516
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_remove_seq_of_low_line.xsd","",
Elemer Lelik's avatar
Elemer Lelik committed
517
518
519
520
                              c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv3_e.ttcn",
521
        "http_www_example_org_name_conv3.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
522
523
524
525
526
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
527
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
528
529
530
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
531
        "www_example_org_name_conv_http.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
532
533
534
535
536
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
537
    f_shellCommandWithVerdict(xsd2ttcn_command & " comment_placement.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
538
539
540
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
541
        "www_example_org_comment_placement.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
542
543
544
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
}//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
  {
560
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
561
562
563
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string.ttcn",
564
        "www_XmlTest_org_string_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
565
566
567
568
569
570
571
572
573
574
575
576
577
578
    }
////////////////////////////////////////////
//
//    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
  {
579
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
580
581
582
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withWhitespace.ttcn",
583
        "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
584
585
586
587
588
589
590
591
592
    }
    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
  {
593
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
594
595
596
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withEnum.ttcn",
597
        "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
    }
    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
  {
613
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
614
615
616
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosLength.ttcn",
617
        "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
618
619
620
621
622
623
    }
  }

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
624
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
625
626
627
628
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
629
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
630
631
632
633
634
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
635
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFixedLength.xsd","",c_shell_error);
Elemer Lelik's avatar
Elemer Lelik committed
636
637
638
639
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
640
    f_shellCommandWithVerdict(xsd2ttcn_command & " fixed_value.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
641
642
643
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
644
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
645
    }
Elemer Lelik's avatar
Elemer Lelik committed
646
647
648
649
650
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
651
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFloatLength.xsd","", c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
652
653
654
655
656
657
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
658
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
659
660
661
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
662
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
663
664
665
666
667
668
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
669
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
670
671
672
673
674
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
675
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMin.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
676
677
678
679
680
681
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
682
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
683
684
    if(getverdict==pass) {
      f_compareFiles(
685
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
686
687
688
689
690
691
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
692
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
693
694
695
696
697
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
698
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
699
700
701
702
703
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
704
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
705
706
707
708
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
709
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
710
711
712
713
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
714
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
715
  }
Elemer Lelik's avatar
Elemer Lelik committed
716
717
718

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
719
  //  f_shellCommandWithVerdict(xsd2ttcn_command & " regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
720
721
  //  if(getverdict==pass) {
  //    f_compareFiles(
722
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
723
724
  //  }
  //}
Elemer Lelik's avatar
Elemer Lelik committed
725
726
727
728
729
730
731
732
733
}//StringTest

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

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
734
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
735
736
    if(getverdict==pass) {
      f_compareFiles(
737
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
738
739
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
740
741

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
742
    f_shellCommandWithVerdict(xsd2ttcn_command & "  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
743
744
745
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
746
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
747
748
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
749
750
751
752
753
754
755
756
757
758
}//BooleanTest


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

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
759
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
760
761
762
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
763
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
764
765
766
767
768
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
769
  //     f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
770
771
772
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
773
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
774
775
776
777
778
779
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
780
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
781
782
783
784

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxInclusive_e.ttcn",
785
        "www_XmlTest_org_decimal_withMinMaxInclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
786
787
788
789
790
    }
  }//tc_

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
791
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
792
793
794
795

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withMinMaxExclusive_e.ttcn",
796
        "www_XmlTest_org_decimal_withMinMaxExclusive.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
797
798
799
800
801
    }
  }//tc_

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
802
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
803
804
805
806

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
807
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
808
809
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
810
811

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
812
    f_shellCommandWithVerdict(xsd2ttcn_command & "  decimal_fractiondigits.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
813
814
815
816

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
817
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
818
819
    }
  }
Elemer Lelik's avatar
Elemer Lelik committed
820
821
822
823
824
825
826
827
828
}//DecimalTest

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

  testcase tc_integer() runs on xmlTest_CT {
829
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
830
831
832
833

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_e.ttcn",
834
        "www_XmlTest_org_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
835
836
837
838
839
840
    }

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
841
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_empty1.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
842
843
844
845
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
846
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withLength.xsd","",c_shell_error)
Elemer Lelik's avatar
Elemer Lelik committed
847
848
849
850
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
851
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
852
853
854

    if(getverdict==pass) {
      f_compareFiles(
855
        "www_XmlTest_org_integer_withEnum_e.ttcn","www_XmlTest_org_integer_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
856
857
858
859
860
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
861
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
862
863
864
865

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinIncl_e.ttcn",
866
        "www_XmlTest_org_integer_withMinIncl.ttcn",c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
867
868
869
870
871
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
872
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
873
874
875

    if(getverdict==pass) {
      f_compareFiles(
876
        "www_XmlTest_org_integer_withMaxIncl_e.ttcn","www_XmlTest_org_integer_withMaxIncl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
877
878
879
880
881
    }
  }//tc_

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
882
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
883
884
885
886

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_integer_withMinExcl_e.ttcn",
887
        "www_XmlTest_org_integer_withMinExcl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
888
889
890
891
892
    }
  }//tc_

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
893
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
894
895
896

    if(getverdict==pass) {
      f_compareFiles(
897
        "www_XmlTest_org_integer_withMaxExcl_e.ttcn","www_XmlTest_org_integer_withMaxExcl.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
898
899
900
    }
  }//tc_

901
902
903
904
905
906
907
908
909
910
  testcase tc_ranges_integer() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  ranges_integer.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_ranges_integer_e.ttcn",
        "www_example_org_ranges_integer.ttcn", c_numOfDiff);
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
911
912
913

}//IntegerTest

914
915
916
917
918
919
920
921
922
  testcase tc_ranges_float() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  ranges_float.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_ranges_float_e.ttcn",
        "www_example_org_ranges_float.ttcn", c_numOfDiff);
    }
  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
923
924

  testcase tc_float_not_a_number() runs on xmlTest_CT {
925
    f_shellCommandWithVerdict(xsd2ttcn_command & "  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
926
927
928
929

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_not_a_number_minex_inf_maxex_inf_e.ttcn",
930
        "www_example_org_not_a_number_minex_inf_maxex_inf.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
931
932
933
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
934
935
936
  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

937
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_simple_enum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
938
939
940

    if(getverdict==pass) {
      f_compareFiles(
941
        "www_XmlTest_org_simple_enum_e.ttcn","www_XmlTest_org_simple_enum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
942
943
944
945
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
946
947
  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

948
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_restrict_comp.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
949
950
951

    if(getverdict==pass) {
      f_compareFiles(
952
        "www_example_org_simpletype_restrict_comp_e.ttcn","www_example_org_simpletype_restrict_comp.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
953
954
955
956
957
958
    }

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

959
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_ref.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
960
961
962

    if(getverdict==pass) {
      f_compareFiles(
963
        "www_example_org_simpletype_ref_e.ttcn","www_example_org_simpletype_ref.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
964
965
966
967
968
969
    }

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

970
    f_shellCommandWithVerdict(xsd2ttcn_command & "  simpletype_base.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
971
972
973

    if(getverdict==pass) {
      f_compareFiles(
974
        "www_example_org_simpletype_base_e.ttcn","www_example_org_simpletype_base.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
975
976
977
978
979
980
981
    }

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

982
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enum_field_names.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
983
984
985

    if(getverdict==pass) {
      f_compareFiles(
986
        "www_example_org_enum_field_names_e.ttcn","www_example_org_enum_field_names.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
987
988
989
990
    }

  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
991
992
  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

993
    f_shellCommandWithVerdict(xsd2ttcn_command & "  attribute_enumeration_variant.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
994
995
996

    if(getverdict==pass) {
      f_compareFiles(
997
        "www_example_org_attribute_enumeration_variant_e.ttcn","www_example_org_attribute_enumeration_variant.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
998
999
1000
    }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1001
1002
1003
1004
1005
1006
1007
1008
1009

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

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
1010
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1011
1012
1013

    if(getverdict==pass) {
      f_compareFiles(
1014
        "www_XmlTest_org_time_e.ttcn","www_XmlTest_org_time.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1015
1016
1017
1018
1019
    }
  }//tc_

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
1020
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1021
1022
1023

    if(getverdict==pass) {
      f_compareFiles(
1024
        "www_XmlTest_org_time_withEnum_e.ttcn","www_XmlTest_org_time_withEnum.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1025
1026
1027
1028
1029
1030
1031
1032
    }
  }//tc_
}//TimeTest

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

1033
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1034
1035
1036

    if(getverdict==pass) {
      f_compareFiles(
1037
        "www_XmlTest_org_list_e.ttcn","www_XmlTest_org_list.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
    }

    // 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 {

1049
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_list_integer.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1050
1051
1052

    if(getverdict==pass) {
      f_compareFiles(
1053
        "www_XmlTest_org_list_integer_e.ttcn","www_XmlTest_org_list_integer.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1054
1055
1056
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1057
1058
1059

  testcase tc_list_simpletype() runs on xmlTest_CT {

1060
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_simpletype.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1061
1062
1063

    if(getverdict==pass) {
      f_compareFiles(
1064
        "www_example_org_list_simpletype_e.ttcn","www_example_org_list_simpletype.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1065
1066
1067
    }

  }//tc_
ebensza's avatar
ebensza committed
1068
1069
1070

  testcase tc_list_complextype() runs on xmlTest_CT {

1071
    f_shellCommandWithVerdict(xsd2ttcn_command & "  list_complextype.xsd","",c_shell_successWithoutWarningAndError)
ebensza's avatar
ebensza committed
1072
1073
1074

    if(getverdict==pass) {
      f_compareFiles(
1075
        "www_example_org_list_complextype_e.ttcn","www_example_org_list_complextype.ttcn", c_numOfDiff);
ebensza's avatar
ebensza committed
1076
1077
1078
    }

  }//tc_
1079
1080
1081
1082
1083
1084
1085

  testcase tc_list_minmaxoccurs() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & "  listMinMaxOccurs.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
1086
        "http_www_example_org_list_minmaxoccurs_e.ttcn","http_www_example_org_list_minmaxoccurs.ttcn", c_numOfDiff);
1087
1088
1089
    }

  }//tc_
Elemer Lelik's avatar
Elemer Lelik committed
1090
1091
1092
1093
1094
1095
}//ListTest

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

1096
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_union.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1097
1098
1099

    if(getverdict==pass) {
      f_compareFiles(
1100
        "www_XmlTest_org_union_e.ttcn","www_XmlTest_org_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1101
1102
1103
1104
1105
    }
  }//tc_
  
  testcase tc_union_optional() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
1110
        "ETSI_CR5852_union_e.ttcn","ETSI_CR5852_union.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1111
1112
1113
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1114
1115
 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

1116
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1117
1118
1119
1120

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction_e.ttcn",
1121
        "www_example_org_enumeration_restriction.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1122
1123
1124
1125
1126
    }
  }

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_seq_enumeration_restriction_e.ttcn",
1132
        "www_example_org_seq_enumeration_restriction.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1133
1134
1135
    }
  }

1136
1137
 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

1138
    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction3.xsd","",c_shell_successWithWarning)
1139
1140
1141
1142

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_restriction3_e.ttcn",
1143
        "www_example_org_enumeration_restriction3.ttcn", c_numOfDiff);
1144
1145
1146
1147
    }
  }


Elemer Lelik's avatar
Elemer Lelik committed
1148
1149
 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_enumeration_remove_dup_e.ttcn",
1155
        "www_example_org_enumeration_remove_dup.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1156
1157
1158
    }
  }

Elemer Lelik's avatar
Elemer Lelik committed
1159
1160
1161
1162
1163
1164
1165
1166
}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

1167
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex1.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1168
1169
1170

     if(getverdict==pass) {
       f_compareFiles(
1171
        "www_XmlTest_org_complex1_e.ttcn","www_XmlTest_org_complex1.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1172
1173
1174
1175
1176
1177
1178
       f_encDecTest_InternationalPrice();
     }
  }//tc_

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

1179
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1180
1181
1182

    if(getverdict==pass) {
      f_compareFiles(
1183
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1184
1185
1186
1187
1188
1189
1190
1191
    }
    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 {

1192
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_simpleContent.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1193
1194
1195

     if(getverdict==pass) {
       f_compareFiles(
1196
        "www_XmlTest_org_complex_simpleContent_e.ttcn","www_XmlTest_org_complex_simpleContent.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1197
1198
1199
1200
1201
1202
      f_encDecTest_ComplexTypeWithSimpleContent1();
      f_encDecTest_ComplexTypeWithSimpleContent2();
      f_encDecTest_ComplexTypeWithSimpleContent2_neg();
     }
  }//tc_

Elemer Lelik's avatar
Elemer Lelik committed
1203
1204
  testcase tc_complex_namespaceas() runs on xmlTest_CT {

1205
    f_shellCommandWithVerdict(xsd2ttcn_command & " namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)
Elemer Lelik's avatar
Elemer Lelik committed
1206
1207
1208

     if(getverdict==pass) {
       f_compareFiles(
1209
        "www_example_org_namespaceas_e.ttcn","www_example_org_namespaceas.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
1210
       f_compareFiles(
1211
        "www_example_org_imported2_e.ttcn","www_example_org_imported2.ttcn", c_numOfDiff);