/******************************************************************************
 * Copyright (c) 2000-2021 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Baranyi, Botond
 *   Ormandi, Matyas
 *   Raduly, Csaba
 *   Szabo, Bence Janos
 *
 ******************************************************************************/

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

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
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",0)
}

//simple records
testcase tc_firstTrial() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " elements.xsd","",c_shell_successWithoutWarningAndError);

  if(getverdict==pass) {
    f_compareFiles(
      "www_example_org_elements_e.ttcn","www_example_org_elements.ttcn", c_numOfDiff);
  }
}

// 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
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " po.xsd noTargetNamespace.xsd","",c_shell_successWithoutWarningAndError);

  if(getverdict==pass) {
    f_compareFiles(
      "http_www_XmlTest_org_po_e.ttcn","http_www_XmlTest_org_po.ttcn", c_numOfDiff);
  }
}
testcase tc_empty() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " empty.xsd","",c_shell_successWithoutWarningAndError);

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

testcase tc_annotation() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation.xsd","",c_shell_successWithWarning);
  if(getverdict==pass) {
      f_compareFiles(
      "www_XmlTest_org_annotation_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff);
    }
}

testcase tc_annotation1() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation1.xsd","",c_shell_successWithoutWarningAndError);
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
}

testcase tc_annotation2() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_annotation2.xsd","",c_shell_error);
  //No f_compareFiles becaulse tc_xml_in_annotation() covering this testcase
}

testcase tc_xml_in_annotation() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " xml_in_annotation.xsd","",c_shell_successWithoutWarningAndError);
  if(getverdict==pass) {
      f_compareFiles(
      "www_example_org_xml_in_annotation_e.ttcn","www_example_org_xml_in_annotation.ttcn", c_numOfDiff);
    }
}

//Incorrect version: 1.1, libxml parser prints warning
testcase tc_version() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_version.xsd","",c_shell_successWithWarning);
}

//************************************
// === 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
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -c XmlTest_annotation.xsd","",c_shell_successWithWarning );
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_c_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
  }
}

//         -e:             disable the generation of encoding instructions in TTCN-3 modules
testcase tc_options_e() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -e XmlTest_annotation.xsd","",c_shell_successWithWarning );
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_e_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
  }
}

//         -f file:        the XSD files are taken from file instead of the command line
testcase tc_options_f() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -f 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);
  }
}

//         -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);
  }
}

testcase tc_options_g() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -g dont_generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
  if(getverdict==pass) {
    f_compareFiles("www_example_org_dont_generate_element_substitution_e.ttcn",
                   "www_example_org_dont_generate_element_substitution.ttcn", c_numOfDiff);
  }

  f_shellCommandWithVerdict(xsd2ttcn_command & " generate_element_substitution.xsd","",c_shell_successWithoutWarningAndError );
  if(getverdict==pass) {
    f_compareFiles("www_example_org_generate_element_substitution_e.ttcn",
                   "www_example_org_generate_element_substitution.ttcn", c_numOfDiff);
  }
}

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

  f_shellCommandWithVerdict(xsd2ttcn_command & " -p XmlTest_annotation.xsd","",c_shell_successWithWarning );
  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 );

  f_shellCommandWithVerdict(xsd2ttcn_command & " -s XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
  //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
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -t  XmlTest_annotation.xsd","",c_shell_successWithWarning );
  if(getverdict==pass) {
    f_compareFiles("www_XmlTest_org_annotation_t_e.ttcn","www_XmlTest_org_annotation.ttcn", c_numOfDiff_ModName);
  }
}

//         -v:             show version information
//TODO:Not ready yet
testcase tc_options_v() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -v","",c_shell_successWithoutWarningAndError );
}

//TODO:Not ready yet
//         -q:             quiet - disable the issue of status messages
testcase tc_options_V() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -q XmlTest_annotation.xsd","",c_shell_successWithWarning);
}

//         -w:             suppress warnings
testcase tc_options_w() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -w XmlTest_annotation.xsd","",c_shell_successWithoutWarningAndError );
}

//TODO:Not ready yet
//         -x:             disable schema validation but generate TTCN-3 modules
testcase tc_options_x() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_annotation.xsd","",c_shell_successWithWarning);
}

testcase tc_options_wrong() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -H XmlTest_annotation.xsd","", c_shell_error);
}

testcase tc_options_missing() runs on xmlTest_CT
{
  f_shellCommandWithVerdict("xsd2ttcn","",c_shell_successWithoutWarningAndError );
  //TODO: check the output
}


testcase tc_XmlTest_label() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_label.xsd","",c_shell_successWithoutWarningAndError );
}

testcase tc_XmlTest_definition() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & " -x XmlTest_definition.xsd","",c_shell_successWithoutWarningAndError );
}
//************************************
//  Testcases_basedOnTtcnStandard9
//************************************
group Testcases_basedOnTtcnStandard9 {

  //Passed
  testcase tc_XmlTest_all() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " all.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
	"www_example_org_all_e.ttcn","www_example_org_all.ttcn", c_numOfDiff);
    }
  }

  testcase tc_element_in_all_neg() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " element_in_all_minmax.xsd","",c_shell_error);
  }

  //Passed
  testcase tc_XmlTest_any_anyAttribute() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " any_anyAttribute.xsd","",c_shell_successWithWarning);

    if(getverdict==pass) {
      f_compareFiles(
	"http_www_example_org_ttcn_wildcards_e.ttcn","http_www_example_org_ttcn_wildcards.ttcn", c_numOfDiff);
    }
  }

  //HQ73011
  //Heading: XSD anyAtribute is inserted into a wrong place
  //Passed
  testcase tc_XmlTest_HQ73011() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict(xsd2ttcn_command & " HQ73011.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "urn_ietf_params_xml_ns_conference_info_e.ttcn","urn_ietf_params_xml_ns_conference_info.ttcn", c_numOfDiff);
    }
  }

  testcase tc_anyattribute_optional() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattribute_optional.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_wildcards_e.ttcn","http_www_example_org_wildcards.ttcn", c_numOfDiff);
    }
  }

  testcase tc_anyattribute_single() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattrib_single.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattrib_single_e.ttcn","www_example_org_anyattrib_single.ttcn", c_numOfDiff);
    }
  }

  testcase tc_anyattribute_in_complex() runs on xmlTest_CT
  {
  f_shellCommandWithVerdict(xsd2ttcn_command & " anyattr_in_complex.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_anyattr_in_complex_e.ttcn","www_example_org_anyattr_in_complex.ttcn", c_numOfDiff);
    }
  }


  //Passed
  testcase tc_XmlTest_attributeGroup() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributeGroup.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attributegroup_e.ttcn","www_example_org_attributegroup.ttcn", c_numOfDiff);
    }
  }

  //double schema definition - Validator Returns with Error, Passed
  testcase tc_XmlTest_attribute_use_noTNS() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_use_noTNS.xsd","",c_shell_error);
  }

  testcase tc_id_attribute() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " id_attrib.xsd","",c_shell_successWithWarning);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_id_attrib_e.ttcn", "www_example_org_id_attrib.ttcn", c_numOfDiff);
    }
  }

  testcase tc_attribute_order() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_order_a.xsd attrib_order_b.xsd attrib_order_c.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_attrib_order_a_e.ttcn", "www_example_org_attrib_order_a.ttcn", c_numOfDiff+1); // +1: imported module
    }

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

  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);
    }
  }

  testcase tc_name_conv_non_alphanumeric() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_non_alphanumeric.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_name_conv2_e.ttcn",
        "http_www_example_org_name_conv2.ttcn", c_numOfDiff);
    }
  }

  testcase tc_module_name_convert_with_diff_namespace() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " imported_module.xsd imported_module_.xsd","",c_shell_successWithoutWarningAndError);

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

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

  testcase tc_module_typename_conversion() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " module_typename_conversion.xsd module_typename_conversion_1.xsd","",c_shell_successWithoutWarningAndError);

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

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

  testcase tc_name_conv_remove_seq_of_low_line() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conv_remove_seq_of_low_line.xsd","",
                              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);
    }
  }

  testcase tc_name_conv_with_z() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z name_conv_with_z.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_name_conv_http_e.ttcn",
        "www_example_org_name_conv_http.ttcn", c_numOfDiff);
    }
  }

  testcase tc_comment_placement() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " comment_placement.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_comment_placement_e.ttcn",
        "www_example_org_comment_placement.ttcn", c_numOfDiff);
    }
  }

}//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
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string.ttcn",
        "www_XmlTest_org_string_e.ttcn", c_numOfDiff);
    }
////////////////////////////////////////////
//
//    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
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withWhitespace.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withWhitespace.ttcn",
        "www_XmlTest_org_string_withWhitespace_e.ttcn", c_numOfDiff);
    }
    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
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_string_withEnum.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withEnum.ttcn",
        "www_XmlTest_org_string_withEnum_e.ttcn", c_numOfDiff);
    }
    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
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosLength.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosLength.ttcn",
        "www_XmlTest_org_string_withPosLength_e.ttcn", c_numOfDiff);
    }
  }

  //Passed, returs with error
  testcase tc_string_withEmptyLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyLength.xsd","",c_shell_error)
  }

  testcase tc_string_withNegativeLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeLength.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withFixedLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFixedLength.xsd","",c_shell_error);
  }

  testcase tc_fixed_value() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " fixed_value.xsd","",c_shell_successWithWarning);
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_fixed_value.ttcn",
        "www_example_org_fixed_value_e.ttcn", c_numOfDiff);
    }
  }

  //Passed
  testcase tc_string_withFloatLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withFloatLength.xsd","", c_shell_error)
  }

  //===minLength===
  //Passed, TR: HL21690
  testcase tc_string_withPosMinLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withMinLength.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withMinLength.ttcn",
        "www_XmlTest_org_string_withMinLength_e.ttcn", c_numOfDiff);
    }
  }

  //Passed
  testcase tc_string_withEmptyMin() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMin.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withNegativeMin() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMin.xsd","",c_shell_error)
  }

  //===maxLength===
  //Passed
  testcase tc_string_withPosMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withPosMax.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_string_withPosMax_e.ttcn","www_XmlTest_org_string_withPosMax.ttcn", c_numOfDiff);
    }
  }

  //Passed
  testcase tc_string_withEmptyMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withEmptyMax.xsd","",c_shell_error)
  }

  //Passed
  testcase tc_string_withNegativeMax() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_string_withNegativeMax.xsd","",c_shell_error)
  }
  //=== minLength>maxLength
  //Passed, TR:
  testcase tc_string_withFaultyMinMaxLength() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withFaultyMinMax.xsd","",c_shell_error)
  }
  //Passed
  testcase tc_string_withOverDefinition() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withOverDefinition.xsd","",c_shell_error)
  }

  testcase tc_string_withTypeAndBase() runs on xmlTest_CT
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_string_withTypeAndBase.xsd","",c_shell_error)
  }

  //testcase tc_string_pattern_square_brackets() runs on xmlTest_CT
  //{
  //  f_shellCommandWithVerdict(xsd2ttcn_command & " regex_square_brackets.xsd","",c_shell_successWithoutWarningAndError);
  //  if(getverdict==pass) {
  //    f_compareFiles(
  //      "www_example_org_regex_square_brackets_e.ttcn","www_example_org_regex_square_brackets.ttcn", c_numOfDiff);
  //  }
  //}
}//StringTest

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

  //TODO: check warning sending for not supported:features
  testcase tc_boolean() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_boolean.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_boolean_e.ttcn","www_XmlTest_org_boolean.ttcn", c_numOfDiff);
    }
  }

  testcase tc_boolean_variant_commented() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  boolean_variant_commented.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_boolean_variant_commented_e.ttcn",
        "www_example_org_boolean_variant_commented.ttcn", c_numOfDiff);
    }
  }
}//BooleanTest


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

  //Passed
  testcase tc_decimal() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal.xsd","",c_shell_successWithoutWarningAndError)
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_e.ttcn",
        "www_XmlTest_org_decimal.ttcn", c_numOfDiff);
    }
  }

  //!!!!!Length not supported!!!!
  //   testcase tc_decimal_withLength() runs on xmlTest_CT {
  //     f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withLength.xsd","",c_shell_successWithoutWarningAndError)
  //     if(getverdict==pass) {
  //       f_compareFiles(
  //         "www_XmlTest_org_decimal_withLength_e.ttcn",
  //         "www_XmlTest_org_decimal_withLength.ttcn", c_numOfDiff);
  //     }
  //   }

  //TR: Generates integer limits instead of decimal
  //TR: HL2715 -Solved
  testcase tc_decimal_withMinMaxInclusive() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withMinMaxInclusive.xsd","",c_shell_successWithoutWarningAndError)

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

  //TR21266 -Solved
  testcase tc_decimal_withMinMaxExclusive() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_decimal_withMinMaxExclusive.xsd","",c_shell_successWithoutWarningAndError)

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

  //TR HL21296
  testcase tc_decimal_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_decimal_withEnum.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_decimal_withEnum_e.ttcn",
        "www_XmlTest_org_decimal_withEnum.ttcn", c_numOfDiff);
    }
  }

  testcase tc_decimal_fractiondigits() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  decimal_fractiondigits.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_decimal_fractiondigits_e.ttcn",
        "www_example_org_decimal_fractiondigits.ttcn", c_numOfDiff);
    }
  }
}//DecimalTest

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

  testcase tc_integer() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer.xsd","",c_shell_successWithoutWarningAndError)

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

  }//tc_

  //negative test
  testcase tc_integer_empty1() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_empty1.xsd","",c_shell_error)
  }//tc_

  //negative test
  testcase tc_integer_withLength() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withLength.xsd","",c_shell_error)
  }//tc_

  //Ready, passed, TR:HL21694 -solved
  testcase tc_integer_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withEnum.xsd","",c_shell_successWithoutWarningAndError)

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

  //Passed
  testcase tc_integer_withMinIncl() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinIncl.xsd","",c_shell_successWithoutWarningAndError)

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

  //Passed
  testcase tc_integer_withMaxIncl() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxIncl.xsd","",c_shell_successWithoutWarningAndError)

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

  //Passed
  testcase tc_integer_withMinExcl() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMinExcl.xsd","",c_shell_successWithoutWarningAndError)

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

  //Passed
  testcase tc_integer_withMaxExcl() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_integer_withMaxExcl.xsd","",c_shell_successWithoutWarningAndError)

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

  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_


}//IntegerTest

  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_

  testcase tc_float_not_a_number() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  not_a_number_minex_inf_maxex_-inf.xsd","",c_shell_successWithoutWarningAndError)

    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);
    }
  }//tc_

  //
  testcase tc_simpleType_enum() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_simpleType_restrict_comp() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_simpleType_ref() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_simpleType_base() runs on xmlTest_CT {

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

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

  }//tc_

  //
  testcase tc_enum_field_names() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_attribute_enumeration_variant() runs on xmlTest_CT {

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

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


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

  //Passed:
  testcase tc_time() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time.xsd","",c_shell_successWithoutWarningAndError)

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

  //Passed TR HL22058
  testcase tc_time_withEnum() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_time_withEnum.xsd","",c_shell_successWithoutWarningAndError)

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

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

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

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

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

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

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

  }//tc_

  testcase tc_list_simpletype() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_list_complextype() runs on xmlTest_CT {

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

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

  }//tc_

  testcase tc_list_minmaxoccurs() runs on xmlTest_CT {

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

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

  }//tc_
}//ListTest

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

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

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

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

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

 testcase tc_enumeration_union_restriction() runs on xmlTest_CT {

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

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

 testcase tc_enumeration_union_restriction2() runs on xmlTest_CT {

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

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

 testcase tc_enumeration_restriction3() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & "  enumeration_restriction3.xsd","",c_shell_successWithWarning)

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


 testcase tc_enumeration_remove_dup() runs on xmlTest_CT {

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

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

}//UnionTest



group ComplexType {

  testcase tc_complex1() runs on xmlTest_CT {

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

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

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

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex2_e.ttcn","www_XmlTest_org_complex2.ttcn", c_numOfDiff);
    }
    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 {

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

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

  testcase tc_complex_namespaceas() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " namespaceas.xsd imported2.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_mixed_conv() runs on xmlTest_CT {

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

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

  testcase tc_complex_group_reference() runs on xmlTest_CT {

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

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

  //TR:HL29258
  testcase tc_complex_mixed_encDec() runs on xmlTest_CT {
     f_encDecTest_ComplexTypeWithMixed();
  }//tc_

 testcase tc_complex_seq_embeds_seq() runs on xmlTest_CT {

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

     if(getverdict==pass) {
       f_compareFiles(
        "http_www_example_org_seq_embeds_seq_e.ttcn","http_www_example_org_seq_embeds_seq.ttcn", c_numOfDiff);
       f_encDecTest_InternationalPrice();
     }
  }//tc_

  testcase tc_complex_choice_converter() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_choice.xsd","",c_shell_successWithWarning)

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_choice_e.ttcn","www_XmlTest_org_complex_choice.ttcn", c_numOfDiff);
     }
  }//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 {
    f_shellCommandWithVerdict(xsd2ttcn_command & "  XmlTest_complex_all.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_all_e.ttcn","www_XmlTest_org_complex_all.ttcn", c_numOfDiff);
    }
  }//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:= {
      order:={math,english,chemistry, physics,history},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:="H1"
    }
    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:= {
      order:={math,english,chemistry, physics,history},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
      order:={math,english,chemistry, physics,history},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
    }
    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:= {
      order:={math,english,chemistry, physics},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
    }
    var  MySubjects2 vl_expectedDecodedPdu:= {
      order:={math,english,chemistry, physics},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2",
      history:=""
    }
    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:= {
      order:={math,english,chemistry,math,math},
      year:="2009",
      english:="Advanced Group 1",
      math:="Beginners 1",
      physics:="Mechanics 1",
      chemistry:="CH2"
      //history:="H1"
    }
    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:= {
      order:={ },
      year:="2009"
      //english:="Advanced Group 1",
      //math:="Beginners 1",
      //physics:="Mechanics 1",
      //chemistry:="CH2"
      //history:="H1"
    }
    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
  {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_minOccursMaxOccurs.xsd","",c_shell_successWithoutWarningAndError);
    if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_complex_minOccursMaxOccurs_e.ttcn","www_XmlTest_org_complex_minOccursMaxOccurs.ttcn", c_numOfDiff);
     }
  }


  testcase tc_complex_extension_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_extension.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_extension_name_attrib_convert() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " name_conversion_extension_attrib.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_long_extension() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " long_extension.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_self_recursion() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_self_recursion.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_type_name_conversion_follow() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " type_conversion_follow.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_extension_with_attrib() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribute_in_extension.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_extension_restriction_with_attrib() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_restriction_extension.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_attrib_enum() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attrib_enum.xsd","",c_shell_successWithoutWarningAndError)

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

  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 {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_restriction.xsd","",c_shell_successWithoutWarningAndError)

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

 testcase tc_complex_restriction_with_use() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_restriction_with_use.xsd","",c_shell_successWithoutWarningAndError)

    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);
    }
  }//tc_

 testcase tc_complex_nillable() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " complex_nillable.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_nillable_nameconversion() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " nillable_nameconversion.xsd","",c_shell_successWithoutWarningAndError)

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

 //Fixed or defaultforempty attribute is not allowed on nillable elements according to TITAN
 testcase tc_nillable_fixed() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " nillable_fixed.xsd","",c_shell_successWithoutWarningAndError)

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

 testcase tc_no_ns_connector() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " no_ns_connector.xsd","",c_shell_successWithoutWarningAndError)

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

 testcase tc_xmlschema() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " MyXMLSchema.xsd","",c_shell_successWithoutWarningAndError)

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

  testcase tc_complex_restriction_encDec() runs on xmlTest_CT
  {
    var MySubjects4Restriction vl_pdu:={
      year:="2009",
      english:="B1",
      math:="Combinatorics 1"
    }
    var charstring vl_expectedEncodedPdu:= "<MySubjects4Restriction Year='2009'>\n\t<English>B1</English>\n\t<Math>Combinatorics 1</Math>\n</MySubjects4Restriction>\n\n";
    f_encDecTest_ComplexTypeWithExtension_MySubject4(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }
  //TR: HL32948, Solved
  testcase tc_complex_restriction_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_restriction_neg1.xsd","",c_shell_error);
  }//tc_

  //TR: HL32948, Solved
  testcase tc_complex_restriction_neg2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_restriction_neg2.xsd","",c_shell_error);
  }//tc_

  //not supported:
  testcase tc_complex_unique_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_unique.xsd","",c_shell_successWithWarning);
    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_unique_e.ttcn",
         "www_XmlTest_org_complex_unique.ttcn", c_numOfDiff);
    }
  }//tc_

  //Positive test: The including and the included schema are in the same namespace
  testcase tc_complex_include_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_include.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_include1_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_ModName);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_include_without_namespace
  //=========================================================================
  //Positive test: The including schema includes a schema without a namespace
  testcase tc_complex_include_without_namespace() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " including_module.xsd included_without_namespace.xsd","",c_shell_successWithoutWarningAndError);

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

  //=========================================================================
  //  tc_complex_include_neg1_converter
  //=========================================================================
  //Negative test: The including and the included schema are not in the same namespace
  testcase tc_complex_include_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_include.xsd XmlTest_complex_include2.xsd","",c_shell_error);
  }//tc_

  //=========================================================================
  //  tc_complex_import_pos1_converter
  //=========================================================================
  //Positive test: The including and the included schema are in different namespaces (import and include)
  testcase tc_complex_import_pos1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_pos.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff);

      f_compareFiles(
       "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_ModName);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_pos2_converter
  //=========================================================================
  //Pos test: Checks if the converter can choose the file having the correct namespace
  //The types are the same in the 2nd and the 3rd file but only the 3rd have the namespace having prefix in the first file
  testcase tc_complex_import_pos2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_pos.xsd XmlTest_complex_include2.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff);

      f_compareFiles(
       "www_XmlTest_org_complex_include2_e.ttcn","www_XmlTest_org_complex_include.ttcn", c_numOfDiff_ModName);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_neg1_converter
  //=========================================================================
  //Negative test: The importing and the imported schema are in different namespaces, but the first file contains unknown type
  //If the type checking is switched off the testcase fails.
  testcase tc_complex_import_neg1_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_neg1.xsd XmlTest_complex_include1.xsd","",c_shell_error);
  }//tc_

  //=========================================================================
  //  tc_complex_import_withSL_converter
  //=========================================================================
  //Positive test: The importing schema contains the namespace and the schema location of the imported schema.
  testcase tc_complex_import_withSL_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_withSchemaLocation.xsd XmlTest_complex_include1.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_e.ttcn","www_XmlTest_org_complex_import.ttcn", c_numOfDiff+1); // +1 because of tc_complex_import_pos2_converter
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_withSL_encDec
  //=========================================================================
  // TODO: fix HR88527
  testcase tc_complex_import_withSL_encDec() runs on xmlTest_CT {
    var PurchaseReportImport pl_pdu:= {
      period :="P3M",
      periodEnding :="1999-12-31",
      regions:= {
        zip_list :={
          {
            code:=95819,
            part_list:= {
              {
                number:="872-AA",
                quantity:=1
              },
              {
                number:="926-AA",
                quantity:=2
              }
            }
          }
        }
      },
      parts :={
        part_list:= {
          {
            number:="872-AA",
            base:="Lawnmower"
          },
          {
            number:="926-AA",
            base:="Baby Monitor"
          }
        }
      }
    }
    var charstring pl_expectedEncodedPdu:="<imp:purchaseReportImport xmlns:imp='www.XmlTest.org/complex_import' xmlns:r='www.XmlTest.org/complex_include' period='P3M' periodEnding='1999-12-31'>\n\t<r:regions>\n\t\t<r:zip code='95819'>\n\t\t\t<r:part number='872-AA' quantity='1'/>\n\t\t\t<r:part number='926-AA' quantity='2'/>\n\t\t</r:zip>\n\t</r:regions>\n\t<r:parts>\n\t\t<r:part number='872-AA'>Lawnmower</r:part>\n\t\t<r:part number='926-AA'>Baby Monitor</r:part>\n\t</r:parts>\n</imp:purchaseReportImport>\n\n";
    //see http://www.w3.org/TR/xmlschema-0/#quartelyReport !
    f_encDecTest_PurchaseReportImport(pl_pdu,pl_expectedEncodedPdu,pl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_import_nameCollision_converter
  //=========================================================================
  //imports the same type from different namespaces
  testcase tc_complex_import_nameCollision_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_AB.xsd XmlTest_complex_import_A.xsd XmlTest_complex_import_B.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_complex_import_A_e.ttcn","www_XmlTest_org_complex_import_A.ttcn", c_numOfDiff);
      f_compareFiles(
        "www_XmlTest_org_complex_import_B_e.ttcn","www_XmlTest_org_complex_import_B.ttcn", c_numOfDiff);
      f_compareFiles(
        "www_XmlTest_org_complex_import_AB_e.ttcn","www_XmlTest_org_complex_import_AB.ttcn", c_numOfDiff);
    }
  }//tc_

  //=========================================================================
  //  tc_complex_import_nameCollision2_converter
  //=========================================================================
  //imports the same type from different namespaces
  testcase tc_complex_import_nameCollision2_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_import_AB.xsd XmlTest_complex_import_B.xsd XmlTest_complex_import_A.xsd","",c_shell_successWithoutWarningAndError);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos_converter
  //=========================================================================
  testcase tc_complex_any_pos_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_complex_any.xsd","",c_shell_successWithWarning);

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

  testcase tc_imported_type_prefix() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " import_prefix_name.xsd imported_prefix_name.xsd","",c_shell_successWithoutWarningAndError);

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

  testcase tc_ambiguous_type_namespace_prefix() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " www_example_org_pref1.xsd www_example_org_pref2.xsd www_example_org_pref3.xsd","",c_shell_successWithoutWarningAndError);

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_pref1_e.ttcn","www_example_org_pref1.ttcn", c_numOfDiff);
    }
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_pref2_e.ttcn","www_example_org_pref2.ttcn", c_numOfDiff);
    }
    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_pref3_e.ttcn","www_example_org_pref3.ttcn", c_numOfDiff);
    }
  }//tc_


  //=========================================================================
  //  tc_complex_any_pos1_encDec
  //  Failed, TR: HL37887
  //=========================================================================
  testcase tc_complex_any_pos1_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_1 vl_pdu := {
      firstField:="1st field",
      elem_list:= {
        "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>"
      },
      thirdField:="3rd field"
    }
    var charstring  vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n";
    f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos2_encDec
  //=========================================================================
  testcase tc_complex_any_pos2_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_2 vl_pdu := {
      elem_list:= {
        "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>"
      }
    }
    var charstring  vl_expectedEncodedPdu:=
        "<r1:ElementContainingXhtml_2 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>\n</r1:ElementContainingXhtml_2>\n\n";
    f_encDecTest_ElementContainingXhtml_2(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

  //=========================================================================
  //  tc_complex_any_pos3_encDec
  //  Failed, TR: HL37887
  //=========================================================================
  testcase tc_complex_any_pos3_encDec() runs on xmlTest_CT {

    var ElementContainingXhtml_1 vl_pdu :=
      {
        firstField := "1st field",
        elem_list := {
          "<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>",
          "<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>" },
        thirdField := "3rd field"
    }

    var charstring  vl_expectedEncodedPdu:="<r1:ElementContainingXhtml_1 xmlns:r1='www.XmlTest.org/complex_any'>\n\t<r1:FirstField>1st field</r1:FirstField>\n\t<table xmlns=\"http://www.w3.org/1999/xhtml\" border=\"0\" width=\"100%\">\n      <tr><td>95819</td><td> </td><td> </td></tr>\n    </table>\n\t<second xmlns=\"http://www.w3.org/1999/xhtml\" element=\"rabbit\"/>\n\t<r1:ThirdField>3rd field</r1:ThirdField>\n</r1:ElementContainingXhtml_1>\n\n";
    f_encDecTest_ElementContainingXhtml_1(vl_pdu,vl_expectedEncodedPdu, vl_pdu);
  }//tc_

}//complexTypes

//=========================================================================
//   group Elements
//=========================================================================
group Elements{

    //Passed
  testcase tc_element_anyType_converter() runs on xmlTest_CT {

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

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

  testcase tc_element_attrib_qualified() runs on xmlTest_CT {

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

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

  testcase tc_element_attrib_unqualified() runs on xmlTest_CT {

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

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

  //Passed TR: Hl29679
  testcase tc_element_anyType_empty_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= { embed_values := omit, attr:=omit,elem_list:={}};
    var charstring vl_expectedEncodedPdu:="<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'/>\n"
    f_encDecTest_Anything1(vl_pdu, vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  //Passed
  testcase tc_element_anyType_attrOnly_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"First\""},elem_list:={}};
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"First\"/>\n";
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  testcase tc_element_anyType_2attrOnly_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= { embed_values := omit, attr:={"name=\"Hunor\"","nationality=\"HU\""},elem_list:={}};
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"/>\n";
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  //Passed, TR: HL29711
  testcase tc_element_anyType_elemOnly_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType'><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
    var Anything1 vl_expectedDecodedPdu:= { embed_values := omit, attr:=omit, elem_list:={"<MyElement1/>", "<MyElement2/>"} };
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
  }//tc_

  testcase tc_element_anyType_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
      embed_values := omit,
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      elem_list:={"<MyElement1/>", "<MyElement2></MyElement2>"} };
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1/><MyElement2></MyElement2></ns31:anything1>\n";
    var Anything1 vl_expectedDecodedPdu:= {
      embed_values := omit, 
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      elem_list:={"<MyElement1/>", "<MyElement2/>"}
    };
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_expectedDecodedPdu);
  }//tc_

  testcase tc_element_anyType_embed_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
      embed_values := {"The ordered ", " has arrived ", "Wait for further information.", "Ok"},
      attr :={"someattr=\"1\""},
      elem_list := {
       "<ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a>",
       "<ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>",
       "<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>"
      }
    }
    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' someattr=\"1\">The ordered <ns:a xmlns:ns=\"http://www.example.org/other\">product</ns:a> has arrived <ns:b xmlns:ns=\"http://www.example.org/other_1\">2</ns:b>Wait for further information.<ns:c xmlns:ns=\"http://www.example.org/other_13\">2</ns:c>Ok</ns31:anything1>\n";
    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_

  //===============================================================
  //  tc_element_anyType_deeper_encDec
  //===============================================================
  testcase tc_element_anyType_deeper_encDec() runs on xmlTest_CT {
    var Anything1 vl_pdu:= {
      embed_values := omit,
      attr:={"name=\"Hunor\"","nationality=\"HU\""},
      elem_list:={"<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>", "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>"} };

    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\"><MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1><MyElement2><Level2>Goddag</Level2>\n</MyElement2></ns31:anything1>\n";
      f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_


  type record of charstring charstringList;

  //===============================================================
  // tc_element_anyType_longer_encDec
  //===============================================================
  testcase tc_element_anyType_longer_encDec() runs on xmlTest_CT {
    var charstringList vl_elementList:= {
        "<MyElement1>\n\t<Level2>\n\t<Level3_1>Great</Level3_1>\n\t<Level3_2>Britain</Level3_2>\n\t</Level2>\n</MyElement1>",
        "<MyElement2><Level2>Goddag</Level2>\n</MyElement2>",
        "<MyElement3><Level2>Goddag</Level2>\n</MyElement3>",
        "<MyElement4><Level2>Goddag</Level2>\n</MyElement4>"
    };
    var Anything1 vl_pdu:= {
      embed_values := omit,
      attr:={
        "name=\"Hunor\"",
        "nationality=\"HU\""
      },
      elem_list:={ }
    };

    var charstring vl_expectedEncodedPdu:=
      "<ns31:anything1 xmlns:ns31='www.XmlTest.org/element_anyType' name=\"Hunor\" nationality=\"HU\">";

    for(var integer i:=0;i<sizeof(vl_elementList);i:=i+1){
      vl_pdu.elem_list[i]:=vl_elementList[i];
      vl_expectedEncodedPdu:=vl_expectedEncodedPdu & vl_elementList[i];
    }
    vl_expectedEncodedPdu:=vl_expectedEncodedPdu & "</ns31:anything1>\n"

    f_encDecTest_Anything1(vl_pdu,vl_expectedEncodedPdu,vl_pdu);
  }//tc_


  //===============================================================
  //  tc_element_recOfElements_converter
  //===============================================================
  //Passed: TR: HL27438, Old name:tc_element_recOfElements_defaultAttr_converter
  testcase tc_element_recOfElements_converter() runs on xmlTest_CT {

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

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

  //Passed, old name: tc_element_recOfElements
  testcase tc_element_recOfElements_encDec() runs on xmlTest_CT {
      f_encDecTest_PersonInfo1();
      f_encDecTest_PersonInfo2();
      f_encDecTest_PersonInfo2_omitOptionals();
//      }
  }//tc_

  //Passed, TR HL27452
  testcase tc_element_recOfElements_defaultAttr_encDec() runs on xmlTest_CT {
      f_encDecTest_PersonInfo2_defaultAttribute();
  }//tc_

  //Passed: TR:27484
  testcase tc_element_recOfElements_defaultElement() runs on xmlTest_CT {

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

     if(getverdict==pass) {
       f_compareFiles(
        "www_XmlTest_org_element_recordOfElements_e.ttcn","www_XmlTest_org_element_recordOfElements.ttcn", c_numOfDiff);
      f_encDecTest_PersonInfo1_defaultElement();
     }
  }//tc_

  //Passed
  testcase tc_element_recOfElements_minMaxOccurs() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements4_e.ttcn","www_XmlTest_org_element_recordOfElements4.ttcn", c_numOfDiff);
      f_encDecTest_PersonInfo4();
    }
  }//tc_

   //Passed, TR:HL28010
   testcase tc_element_recOfElements_maxOccursInfinity_converter() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements3_e.ttcn","www_XmlTest_org_element_recordOfElements3.ttcn", c_numOfDiff);
    }

  }//tc_

  //Passed, TR: HL28024
  testcase tc_element_recOfElements_maxOccursInfinity_encoderDecoder() runs on xmlTest_CT {

    f_encDecTest_PersonInfo3();
  }//tc_

  testcase tc_element_recOfElements_anonymousType_conv() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_XmlTest_org_element_recordOfElements5_e.ttcn","www_XmlTest_org_element_recordOfElements5.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_element_recOfElements_anonymousType_encDec() runs on xmlTest_CT {
   f_encDecTest_PersonInfo5();
  }//tc_


  testcase tc_substitutiongroup() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_e.ttcn","www_example_org_substitutiongroup.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_name_as() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_name_as_e.ttcn","www_example_org_substitutiongroup_name_as.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_abstract_block_rest() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_abstract_block_1_e.ttcn",
        "www_example_org_substitutiongroup_abstract_block_1.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_abstract_block_ext() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_abstract_block_2_e.ttcn",
        "www_example_org_substitutiongroup_abstract_block_2.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_complex_without_element() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
        "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_long_extension() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complex_without_element_e.ttcn",
        "www_example_org_substitutiongroup_complex_without_element.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_complextype_block() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_complextype_block_e.ttcn",
        "www_example_org_substitutiongroup_complextype_block.ttcn", c_numOfDiff);
    }

  }//tc_

  //Test if we find the substitutiongroup references in notargetnamespace
  testcase tc_substitutiongroup_notargetnamespace() runs on xmlTest_CT {

    //f_shellCommandWithVerdict(xsd2ttcn_command & " substitutiongroup_notargetnamespace.xsd","",c_shell_successWithoutWarningAndError)
    setverdict(pass);

  }//tc_

  testcase tc_substitutiongroup_neg() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " substitutiongroup_neg.xsd","",c_shell_error)

  }//tc_

  testcase tc_substitutiongroup_diff_module() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " substitutiongroup_main.xsd substitutiongroup_ref.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_ref_e.ttcn",
        "www_example_org_substitutiongroup_ref.ttcn", c_numOfDiff);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_main_e.ttcn",
        "www_example_org_substitutiongroup_main.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_rename() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_substitutiongroup_rename_e.ttcn",
        "www_example_org_substitutiongroup_rename.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_substitutiongroup_endDec() runs on xmlTest_CT {

    f_encDecTest_ize_subs();
  }

  testcase tc_type_substitution() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_e.ttcn",
        "www_example_org_type_substitution.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_encDec() runs on xmlTest_CT {

    f_encDecTest_type_subs();

  }//tc_

  testcase tc_type_substitution_chain() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_chain.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_chain_e.ttcn",
        "www_example_org_type_substitution_chain.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_abstract_block() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_abstract_block.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_abstract_block_e.ttcn",
        "www_example_org_type_substitution_abstract_block.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_diff_module() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_mod1.xsd type_substitution_mod2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_mod1_e.ttcn",
        "www_example_org_type_substitution_mod1.ttcn", c_numOfDiff);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_mod2_e.ttcn",
        "www_example_org_type_substitution_mod2.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_simpletype() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_simpletype.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_simpletype_e.ttcn",
        "www_example_org_type_substitution_simpletype.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_with_elem_substitution() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_subs_with_elem_subs.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_subs_with_elem_subs_e.ttcn",
        "www_example_org_type_subs_with_elem_subs.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_element_in_ct() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_elem_in_ct_mod1.xsd type_substitution_elem_in_ct_mod2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_elem_in_ct_mod1_e.ttcn",
        "www_example_org_type_substitution_elem_in_ct_mod1.ttcn", c_numOfDiff);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_elem_in_ct_mod2_e.ttcn",
        "www_example_org_type_substitution_elem_in_ct_mod2.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_only_element_substitution() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h only_element_substitution.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_only_element_substitution_e.ttcn",
        "www_example_org_only_element_substitution.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_builtintype() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_builtintype.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_builtintype_e.ttcn",
        "www_example_org_type_substitution_builtintype.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_rename() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_rename.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_rename_e.ttcn",
        "www_example_org_type_substitution_rename.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_complex_cascade() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_complex_cascade.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_complex_cascade_e.ttcn",
        "www_example_org_type_substitution_complex_cascade.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_type_substitution_simple_cascade() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " -h type_substitution_simple_cascade.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_type_substitution_simple_cascade_e.ttcn",
        "www_example_org_type_substitution_simple_cascade.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_defaultforempty() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " defaultforempty.xsd","",c_shell_successWithWarning)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_defaultforempty_e.ttcn",
        "www_example_org_defaultforempty.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_defaultforempty_diff_module() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " defaultforempty_mod1.xsd defaultforempty_mod2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_defaultforempty_mod1_e.ttcn",
        "www_example_org_defaultforempty_mod1.ttcn", c_numOfDiff);
    }

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_defaultforempty_mod2_e.ttcn",
        "www_example_org_defaultforempty_mod2.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_defaultforempty_same_ns() runs on xmlTest_CT {

    f_shellCommandWithVerdict(xsd2ttcn_command & " defaultforempty_same_ns1.xsd defaultforempty_same_ns2.xsd","",c_shell_successWithoutWarningAndError)

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_defaultforempty_same_ns_e.ttcn",
        "www_example_org_defaultforempty_same_ns.ttcn", c_numOfDiff);
    }

  }//tc_

  //========================================================
  // Alias tests
  //========================================================

  testcase tc_simpletype_aliases() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_simpletype_aliases_e.ttcn",
        "www_example_org_simpletype_aliases.ttcn", c_numOfDiff);
    }

  }//tc_

  testcase tc_complextype_aliases() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "www_example_org_complextype_aliases_e.ttcn",
        "www_example_org_complextype_aliases.ttcn", c_numOfDiff);
    }

  }//tc_


  testcase tc_correct_ref_and_type() runs on xmlTest_CT {

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

    if(getverdict==pass) {
      f_compareFiles(
        "http_www_example_org_correct_ref_and_type_e.ttcn",
        "http_www_example_org_correct_ref_and_type.ttcn", c_numOfDiff);
    }

  }//tc_



  //========================================================
  // tc_element_nameInheritance_conv
  // Checks if name of named (aliased) type is not inherited
  //========================================================
  testcase tc_element_nameInheritance_conv() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_element_nameInheritance.xsd","",c_shell_successWithoutWarningAndError);
  }//tc_

  //========================================
  // tc_element_nameInheritance_encDec
  // Checks if name of named (aliased) type is not inherited
  //========================================
  //TR HL49978
  testcase tc_element_nameInheritance_encDec() runs on xmlTest_CT {
    f_encDecTest_nameInheritance();
  }//tc_

  //========================================
  // tc_element_Tgc_encDec
  // Checks if name of named (aliased) type is not inherited
  //========================================
  //TR HL49978
  testcase tc_element_Tgc_encDec() runs on xmlTest_CT {
    f_encDecTest_Tgc();
  }//tc_

  testcase tc_element_abstract_conv() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_element_abstract.xsd","",c_shell_successWithoutWarningAndError);
  }//tc_

  testcase tc_element_nillable_converter() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -z XmlTest_imsike.xsd","",c_shell_successWithoutWarningAndError );

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

  testcase tc_element_nillable_with_annotations() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " nillable_annotations.xsd","",c_shell_successWithoutWarningAndError );

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

  testcase tc_element_nillable_in_nillable_extension() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " nillable_in_nillable_extension.xsd","",c_shell_successWithoutWarningAndError );

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

  testcase tc_element_attributegroup_nillable() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attributegroup_nillable.xsd","",c_shell_successWithoutWarningAndError );

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

  testcase tc_element_attributegroup_ingroup() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " attribgroup_ingroup.xsd","",c_shell_successWithoutWarningAndError );

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

  //IndividualTrigger, nile="false"
  testcase tc_element_nillable_IndividualTrigger_nilFalse_encDec() runs on xmlTest_CT {
    f_encDecTest_IndividualTrigger1();
  }//tc_

  //IndividualTrigger, nil="true"
  testcase tc_element_nillable_IndividualTrigger_nilTrue_encDec() runs on xmlTest_CT {
    f_encDecTest_IndividualTrigger2(); //empty record
  }//tc_

  //Isp, nil="false"
  testcase tc_element_nillable_Isp_nilFalse_encDec() runs on xmlTest_CT {
    f_encDecTest_Isp1();
  }//tc_

  //Isp, nil="true"
  testcase tc_element_nillable_Isp_nilTrue_encDec() runs on xmlTest_CT {
    f_encDecTest_Isp2();
  }//tc_

  //RemarkNillable, nil="false"
  testcase tc_element_nillable_RemarkNillable_nilFalse_encDec() runs on xmlTest_CT {
    f_encDecTest_RemarkNillable1();
  }//tc_

  //RemarkNillable, nil="true"
  testcase tc_element_nillable_RemarkNillable_nilTrue_encDec() runs on xmlTest_CT {
    f_encDecTest_RemarkNillable2();
  }//tc_
  
  
  testcase tc_substitution_group_merged() runs on xmlTest_CT {
    f_shellCommandWithVerdict(xsd2ttcn_command & " -o substitution_group_one.xsd substitution_group_two.xsd",
      "", c_shell_successWithoutWarningAndError);

    if(getverdict == pass) {
      f_compareFiles(
        "XSD_Definitions_e.ttcn",
        "XSD_Definitions.ttcn", c_numOfDiff);
    }
  }
  
  testcase tc_name_clashes_and_references_merged() runs on xmlTest_CT { // bug 541748
    f_shellCommandWithVerdict(xsd2ttcn_command & " -o name_clashes_and_references_A.xsd name_clashes_and_references_B.xsd name_clashes_and_references_C.xsd",
      "", c_shell_successWithoutWarningAndError);

    if(getverdict == pass) {
      f_compareFiles(
        "XSD_Definitions_e2.ttcn",
        "XSD_Definitions.ttcn", c_numOfDiff);
    }
  }
  
  testcase tc_group_ref_order() runs on xmlTest_CT { // bug 537922
    f_shellCommandWithVerdict(xsd2ttcn_command & " Bug537922.xsd", "", c_shell_successWithoutWarningAndError);

    if(getverdict == pass) {
      f_compareFiles(
        "www_example_org_bug537922_e.ttcn",
        "www_example_org_bug537922.ttcn", c_numOfDiff);
    }
  }
  
  testcase tc_noTargetNamespace_separate() runs on xmlTest_CT { // bug 550942
    f_shellCommandWithVerdict(xsd2ttcn_command & " -N XmlTest_noTargetNamespace_1.xsd XmlTest_noTargetNamespace_2.xsd", "", c_shell_successWithoutWarningAndError);

    if(getverdict == pass) {
      f_compareFiles(
        "NoTargetNamespace_XmlTest_noTargetNamespace_1_xsd_e.ttcn",
        "NoTargetNamespace_XmlTest_noTargetNamespace_1_xsd.ttcn", c_numOfDiff);
      f_compareFiles(
        "NoTargetNamespace_XmlTest_noTargetNamespace_2_xsd_e.ttcn",
        "NoTargetNamespace_XmlTest_noTargetNamespace_2_xsd.ttcn", c_numOfDiff);
    }
  }
  
  testcase tc_noTargetNamespace_merged() runs on xmlTest_CT { // bug 550942
    f_shellCommandWithVerdict(xsd2ttcn_command & " XmlTest_noTargetNamespace_1.xsd XmlTest_noTargetNamespace_2.xsd", "", c_shell_successWithoutWarningAndError);

    if(getverdict == pass) {
      f_compareFiles(
        "NoTargetNamespace3_e.ttcn",
        "NoTargetNamespace.ttcn", c_numOfDiff);
    }
  }

}//Element

//=========================================================================
// Control
//=========================================================================
// When creating new testcases: Change the copyright header of the expected
// ttcn just like in the other expected ttcns and write your name into a 
// contributors section just like in the other expected ttcns. In normal
// case theese changes are required.
control {
  execute(tc_versionTest());//Passed
  execute(tc_xsd2ttcn_versionTest());//Passed
  //====My tcs====
  execute(tc_firstTrial());//Passed
  execute(tc_secondTrial());//Passed
  execute(tc_empty()); //Passed, TR:
  //appended to increase coverage:

  execute(tc_annotation());
  execute(tc_annotation1());
  execute(tc_annotation2());
  execute(tc_xml_in_annotation());
  //option tests:
  execute(tc_version());
  execute(tc_options_c());
  execute(tc_options_e());
  execute(tc_options_f());
  execute(tc_options_J());
  execute(tc_options_g());
  execute(tc_options_p());
  execute(tc_options_s());
  execute(tc_options_t());
  execute(tc_options_v());
  execute(tc_options_V());
  execute(tc_options_w());
  execute(tc_options_x());
  execute(tc_options_wrong());
  execute(tc_options_missing());
  //===LABEL and DEFINITION - unknown but used tags

  //===ttcn standard===
  execute(tc_XmlTest_all());//Passed
  execute(tc_element_in_all_neg());
  execute(tc_XmlTest_any_anyAttribute());//Passed
  execute(tc_XmlTest_HQ73011());//Passed
  execute(tc_anyattribute_optional());
  execute(tc_anyattribute_single());
  execute(tc_anyattribute_in_complex());
  execute(tc_XmlTest_attributeGroup());//Passed
  execute(tc_XmlTest_attribute_use_noTNS());//Passed
  execute(tc_id_attribute());
  execute(tc_attribute_order());
  execute(tc_attribute_rename());
  execute(tc_name_conv_non_alphanumeric());
  execute(tc_module_name_convert_with_diff_namespace());
  execute(tc_module_typename_conversion());
  execute(tc_name_conv_remove_seq_of_low_line());
  execute(tc_name_conv_with_z());
  execute(tc_comment_placement());

  //===W3C standard===

  //===String===
  execute(tc_string()); //passed
  execute(tc_string_withWhitespace());//Check it once again if encoder or decoder transform "content" !!!
  execute(tc_string_withEnum());//Passed, TR: HL26227
  execute(tc_string_withPosLength());//TR: HL21257,
  execute(tc_string_withEmptyLength()); //TR: HL20441, Solved
  execute(tc_string_withNegativeLength());//Passed
  execute(tc_string_withFixedLength());  //Passed
  execute(tc_fixed_value());
  execute(tc_string_withFloatLength()); //passed ???
  execute(tc_string_withPosMinLength()); //Passed, TR: HL21690
  execute(tc_string_withEmptyMin());//Passed
  execute(tc_string_withNegativeMin());//Passed
  execute(tc_string_withPosMax())//Passed
  execute(tc_string_withEmptyMax());//Passed
  execute(tc_string_withNegativeMax());//Passed
  execute(tc_string_withFaultyMinMaxLength());//Passed, TR: TODO
  execute(tc_string_withOverDefinition()); //TR: HL25948, Solved
  execute(tc_string_withTypeAndBase());//Passed
  //TODO: put this test back later
  //execute(tc_string_pattern_square_brackets());
  //===Boolean===
  execute(tc_boolean());//Passed
  execute(tc_boolean_variant_commented());
  //===Decimal===
  execute(tc_decimal());//Passed
  //execute(tc_decimal_withLength()); length not supported
  execute(tc_decimal_withMinMaxInclusive());//TR: HL20715
  execute(tc_decimal_withMinMaxExclusive());//Passed TR: HL21166 -solved
  execute(tc_decimal_withEnum());           //Passed,TR HL21196 -solved
  execute(tc_decimal_fractiondigits());
  //===Integer===
  execute(tc_integer());//Passed
  execute(tc_integer_empty1());//Passed
  execute(tc_integer_withEnum());   //Passed, TR:HL21694 -solved
  execute(tc_integer_withMinIncl());//Passed
  execute(tc_integer_withMaxIncl());//Passed
  execute(tc_integer_withMinExcl());//Passed
  execute(tc_integer_withMaxExcl());//Passed
  execute(tc_ranges_integer());//Passed
  //===Time===
  execute(tc_time());//passed
  execute(tc_time_withEnum());//Passed TR HL22058
  //==list===
  execute(tc_list_conv()); //Passed
  execute(tc_list_encDec());//Passed
  execute(tc_integerList());//Passed
  execute(tc_list_simpletype());//Passed
  execute(tc_list_complextype());
  execute(tc_list_minmaxoccurs());
  //===Float===
  execute(tc_ranges_float());
  execute(tc_float_not_a_number());

  //===simpleType enum====
  execute(tc_simpleType_enum());//Passed
  execute(tc_simpleType_restrict_comp());
  execute(tc_simpleType_ref());
  execute(tc_simpleType_base());
  execute(tc_enum_field_names());
  execute(tc_attribute_enumeration_variant());
  //===union===
  execute(tc_union());//TR:HL23577
  execute(tc_union_optional());//CR_TR18883
  execute(tc_enumeration_union_restriction());
  execute(tc_enumeration_union_restriction2());
  execute(tc_enumeration_restriction3());
  execute(tc_enumeration_remove_dup());
  //===complex===
  execute(tc_complex1()); //Passed
  execute(tc_complex2());//TR: HL24977
  execute(tc_complex_simpleContent());
  execute(tc_complex_namespaceas());
  execute(tc_complex_mixed_conv()); //Passed
  execute(tc_complex_group_reference());
  execute(tc_complex_mixed_encDec()); //TR:HL29258 - Rejected. Reason: Not supported feature, TODO:Write CR!!
  execute(tc_complex_seq_embeds_seq());
  execute(tc_complex_choice_converter());//Passed
  execute(tc_complex_choice_encDec());//Passed

  execute(tc_complex_all_converter());//Passed
  execute(tc_complex_all_emptySet_encDec());//Passed
  execute(tc_complex_all_fullSet_encDec());//Passed
  execute(tc_complex_all_subSet_encDec());//Passed
  execute(tc_complex_all_inconsistentSet_encDec());//Passed
  execute(tc_complex_all_noOptional_pos_encDec()); //Passed
  execute(tc_complex_all_noOptional_neg1_encDec());  //Error,  TR: HL32978
  execute(tc_complex_all_noOptional_neg2_encDec());  //Failed, TR: HL32978
  execute(tc_complex_all_noOptional_neg3_encDec());  //Failed, TR: HL32978
  execute(tc_complex_all_noOptional_empty_encDec()); //Failed, TR: HL32978
  execute(tc_complex_minOccursMaxOccurs());  //Passed, TR (ethgry): HL10386
  execute(tc_complex_extension_converter()); //TR HL32505
  execute(tc_complex_extension_encDec());    //Passed
  execute(tc_complex_extension_name_attrib_convert());
  execute(tc_complex_long_extension());
  execute(tc_type_name_conversion_follow());
  execute(tc_complex_extension_with_attrib());
  execute(tc_extension_restriction_with_attrib());
  execute(tc_attrib_enum());
  execute(tc_complex_self_recursion());
  execute(tc_complex_restriction_converter()); //Failed, TR HL32896
  execute(tc_complex_restriction_with_use());
  execute(tc_complex_nillable());
  execute(tc_nillable_nameconversion());
  execute(tc_nillable_fixed());
  execute(tc_no_ns_connector());
  execute(tc_xmlschema());



  //execute(tc_complex_restriction_encDec()); Dynamic test case error:Attempt to XER-encode an unbound record of




  execute(tc_complex_restriction_neg1_converter());//TR: HL32948
  execute(tc_complex_restriction_neg2_converter());//TR: HL32948
  execute(tc_complex_unique_converter());
  execute(tc_complex_include_converter());
  execute(tc_complex_include_neg1_converter());
  execute(tc_complex_include_without_namespace());
  execute(tc_complex_import_pos1_converter());
  execute(tc_complex_import_pos2_converter());
  execute(tc_complex_import_neg1_converter());
  execute(tc_complex_import_withSL_converter());//SchemaLocation
  execute(tc_complex_import_withSL_encDec());
  execute(tc_complex_import_nameCollision_converter());
  execute(tc_complex_import_nameCollision2_converter());
  execute(tc_complex_any_pos_converter());
  execute(tc_imported_type_prefix());
  execute(tc_ambiguous_type_namespace_prefix());
  execute(tc_complex_any_pos1_encDec()); //Failed, TR: HL37887
  execute(tc_complex_any_pos2_encDec());
  execute(tc_complex_any_pos3_encDec());//failed, TR:
  //===element===
  execute(tc_element_anyType_converter());//Passed
  execute(tc_element_attrib_qualified());
  execute(tc_element_attrib_unqualified());
  execute(tc_element_anyType_empty_encDec());//Passed TR: HL29679
  execute(tc_element_anyType_attrOnly_encDec());//Passed
  execute(tc_element_anyType_2attrOnly_encDec());//Passed
  execute(tc_element_anyType_elemOnly_encDec());//Passed, TR: HL29711
  execute(tc_element_anyType_encDec());//Passed, HL29711
  execute(tc_element_anyType_embed_encDec());
  execute(tc_element_anyType_deeper_encDec());
  execute(tc_element_anyType_longer_encDec());
  execute(tc_element_recOfElements_converter()); //Passed: TR: HL27438
  execute(tc_element_recOfElements_encDec());//Passed
  execute(tc_element_recOfElements_defaultAttr_encDec());//Passed, TR HL27452
  execute(tc_element_recOfElements_defaultElement());//Passed: TR:27484
  execute(tc_element_recOfElements_maxOccursInfinity_converter());//Passed, TR:HL28010
  execute(tc_element_recOfElements_maxOccursInfinity_encoderDecoder());//Passed, TR: HL2802
  execute(tc_element_recOfElements_anonymousType_conv());
  execute(tc_element_recOfElements_anonymousType_encDec());


  //===substitutiongroup===
  execute(tc_substitutiongroup());
  execute(tc_substitutiongroup_name_as());
  execute(tc_substitutiongroup_abstract_block_rest());
  execute(tc_substitutiongroup_abstract_block_ext());
  execute(tc_substitutiongroup_complex_without_element());
  execute(tc_substitutiongroup_long_extension());
  execute(tc_substitutiongroup_complextype_block());
  execute(tc_substitutiongroup_notargetnamespace());
  execute(tc_substitutiongroup_neg());
  execute(tc_substitutiongroup_diff_module());
  execute(tc_substitutiongroup_rename());
  execute(tc_substitutiongroup_endDec());

  //===type substitution===
  execute(tc_type_substitution());
  execute(tc_type_substitution_encDec());
  execute(tc_type_substitution_chain());
  execute(tc_type_substitution_abstract_block());
  execute(tc_type_substitution_diff_module());
  execute(tc_type_substitution_simpletype());
  execute(tc_type_substitution_with_elem_substitution());
  execute(tc_type_substitution_element_in_ct());
  execute(tc_only_element_substitution());
  execute(tc_type_substitution_builtintype());
  execute(tc_type_substitution_rename());
  execute(tc_type_substitution_complex_cascade());
  execute(tc_type_substitution_simple_cascade());

  execute(tc_defaultforempty());
  execute(tc_defaultforempty_diff_module());
  execute(tc_defaultforempty_same_ns());

  //===aliases===
  execute(tc_simpletype_aliases());
  execute(tc_complextype_aliases());

  execute(tc_correct_ref_and_type());


  execute(tc_element_nameInheritance_conv());
  execute(tc_element_nameInheritance_encDec());//TR HL49978
  execute(tc_element_Tgc_encDec());//TR HL49978
  execute(tc_element_abstract_conv()); //Not supported features
  execute(tc_element_nillable_converter());
  execute(tc_element_nillable_with_annotations());
  execute(tc_element_nillable_in_nillable_extension());
  execute(tc_element_attributegroup_nillable());
  execute(tc_element_attributegroup_ingroup());
  execute(tc_element_nillable_IndividualTrigger_nilFalse_encDec());
  execute(tc_element_nillable_IndividualTrigger_nilTrue_encDec());
  execute(tc_element_nillable_Isp_nilFalse_encDec());
  execute(tc_element_nillable_Isp_nilTrue_encDec());
  execute(tc_element_nillable_RemarkNillable_nilFalse_encDec());
  execute(tc_element_nillable_RemarkNillable_nilTrue_encDec());

  execute(tc_substitution_group_merged());
  execute(tc_name_clashes_and_references_merged());
  
  execute(tc_group_ref_order());
  
  execute(tc_noTargetNamespace_separate());
  execute(tc_noTargetNamespace_merged());
}

} with {
  extension "version R1A02"; // a prerelease version
  extension "requiresTITAN R1C01";
} // end of module
