/******************************************************************************
 * Copyright (c) 2000-2025 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
 *   Kovacs, Ferenc
 *   Raduly, Csaba
 *
 ******************************************************************************/
module NegTest_RAW_Testcases {

import from NegTest_RAW_Types all;

type component RawComp {};

  //================================================
  //======== Functions==============================
  //================================================
  function f_compareAndVerdict(in octetstring pl_encoded, in octetstring pl_expected) {
    //log("Encoded value:  ", pl_encoded); //switch off from cfg file !
    //log("Expected value: ", pl_expected);
    if( pl_encoded == pl_expected ) {
      setverdict(pass);
    } else {
      setverdict(fail, "! encoded value: ", pl_encoded, "!expected value: ", pl_expected );
    }
  }


//seq
external function encode_rawInteger10( in RawInteger10 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqEmpty(in RawSeqEmpty pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqBool(in RawSeqBool pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt(in RawSeqInt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt8(in RawSeqInt8 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqRawEnum(in RawSeqRawEnum pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt2( in RawSeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt28( in RawSeqInt28 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqInt2( in RawSeqIntSeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqInt2opt( in RawSeqIntSeqInt2opt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqInt2optopt( in RawSeqIntSeqInt2optopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt3( in RawSeqInt3 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

//external function encode_rawSeqInt3opt( in RawSeqInt3opt pdu) return octetstring
//with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqInt4( in RawSeqInt4 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOJKL( in RawSeqOJKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIOKL( in RawSeqIOKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqCharstring(in RawSeqCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqStr(in RawSeqStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqBitStr(in RawSeqBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOctStr(in RawSeqOctStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntCharstring( in RawSeqIntCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntStr( in RawSeqIntStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntBitStr( in RawSeqIntBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqISKL( in RawSeqISKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqIntSeqInt2( in RawSeqIntSeqIntSeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqIntSeqInt2SeqCharstring2( in RawSeqIntSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqIntSeqInt2SeqInt2(in RawSeqIntSeqIntSeqInt2SeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqCharstring2( in RawSeqIntSeqCharstring2  pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqSeqIntSeqInt2SeqCharstring2( in RawSeqSeqIntSeqInt2SeqCharstring2  pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqIntSeqIntSeqInt2optoptSeqCharstring2( in RawSeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
  in RawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

//seq of
external function encode_rawSeqOfBool(in RawSeqOfBool pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfInt(in RawSeqOfInt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfInt32(in RawSeqOfInt32 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfRawEnum(in RawSeqOfRawEnum pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfCharstring( in RawSeqOfCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfBitStr(in RawSeqOfBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfOctStr(in RawSeqOfOctStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfRawUnionBT(in RawSeqOfRawUnionBT pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfRawUnionBT32(in RawSeqOfRawUnionBT32 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(in  RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(in RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

//set
external function encode_rawSetEmpty(in RawSetEmpty pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetBool(in RawSetBool pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt(in RawSetInt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt8(in RawSetInt8 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetRawEnum(in RawSetRawEnum pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt2( in RawSetInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt2opt( in RawSetInt2opt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt2opt32( in RawSetInt2opt32 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2( in RawSetIntSeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2T( in RawSetIntSeqInt2T pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2opt( in RawSetIntSeqInt2opt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2Topt( in RawSetIntSeqInt2Topt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2optopt( in RawSetIntSeqInt2optopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqInt2Toptopt( in RawSetIntSeqInt2Toptopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt3( in RawSetInt3 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt3opt( in RawSetInt3opt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt4( in RawSetInt4 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetInt4opt( in RawSetInt4opt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOJKL( in RawSetOJKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIOKL( in RawSetIOKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetCharstring(in RawSetCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetStr(in RawSetStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetBitStr(in RawSetBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOctStr(in RawSetOctStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntCharstring( in RawSetIntCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntStr( in RawSetIntStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntBitStr( in RawSetIntBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetISKL( in RawSetISKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetISKLopt( in RawSetISKLopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIS2KLopt( in RawSetIS2KLopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetISOKL( in RawSetISOKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetISOKLopt( in RawSetISOKLopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIOSKL( in RawSetIOSKL pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIOSKLopt( in RawSetIOSKLopt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqIntSeqInt2( in RawSetIntSeqIntSeqInt2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqIntSeqInt2SeqCharstring2( in RawSetIntSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqCharstring2( in RawSetIntSeqCharstring2  pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetSeqIntSeqInt2SeqCharstring2( in RawSetSeqIntSeqInt2SeqCharstring2  pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetIntSeqIntSeqInt2optoptSeqCharstring2( in RawSetIntSeqIntSeqInt2optoptSeqCharstring2  pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2( in RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(
  in RawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

//set of
external function encode_rawSetOfBool(in RawSetOfBool pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfBoolBogus(in RawSetOfBoolBogus pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfInt(in RawSetOfInt pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfInt32(in RawSetOfInt32 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfRawEnum(in RawSetOfRawEnum pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfCharstring( in RawSetOfCharstring pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfBitStr(in RawSetOfBitStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfOctStr(in RawSetOfOctStr pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfRawUnionBT(in RawSetOfRawUnionBT pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfRawUnionBT32(in RawSetOfRawUnionBT32 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawSetOfSeqSeqIntSeqInt2SeqCharstring2(in  RawSetOfSeqSeqIntSeqInt2SeqCharstring2 pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

//union
external function encode_rawUnionBasicTypes( in RawUnionBasicTypes pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawUnionBasicTypesT( in RawUnionBasicTypesT pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }

external function encode_rawUnionComplexTypes( in RawUnionComplexTypes pdu) return octetstring
with { extension "prototype(convert) encode(RAW)" }
//external function decode_rawUnionComplexTypes( in octetstring s) return RawUnionComplexTypes
//with { extension "prototype(convert) decode(TEXT)" }

modulepar {
  integer tsp_maxInt := 1000000;
  integer tsp_step := -10;
}


group Sequences{
  template RawSeqInt2opt t_msi2opt := { i:= 1, j := 2 }
  template RawSeqInt2opt t_msi2optomit := { i:= 1, j := omit }
  const RawSeqInt2 c_msi2 := { i:= 1, j := 2 }
  const RawSeqInt2opt c_msi2opt := { i:= 1, j := 2 }
  const RawSeqInt2opt c_msi2optomit := { i:= 1, j := omit }

  template RawSeqEmpty t_seqEmpty :={}

  template RawSeqBool t_msb(template boolean p_b) := {b:= p_b}
  template RawSeqInt t_msi(template integer p_i) := {i:= p_i}
  template RawSeqInt8 t_msi8(template integer p_i) := {i:= p_i}


  template RawSeqInt2 t_msi2(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  template RawSeqInt28 t_msi28(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  //variable related values:
  //template RawSeqInt2 t_msi2_valueSeqIntOptFieldC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=int32 : c_msi2opt.j" } ;//2

  template RawSeqIntSeqInt2 t_msisi2_trial(template integer p_i, template integer p_j, template integer p_k) := { p_i, {  p_j,  p_k} } //not used yet
  template RawSeqIntSeqInt2 t_msisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
  //
  template RawSeqInt3 t_msi3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}

  template RawSeqInt4 t_msi4(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}

  template RawSeqISKL t_msiskl(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  //===seq of seq of seq:==

  //Sequence of depth 3:

  //real (charstring)
  template RawSeqCharstring t_msr(template charstring p_x) := { x:=p_x }
  template RawSeqCharstring2 t_mr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}

  //charstring->VisibleString
  template RawSeqStr t_msstr(template charstring p_s) := { s := p_s }

  //bitstring:
  template RawSeqBitStr t_msbitstr(template bitstring p_b) := { b := p_b };
  template RawSeqOctStr t_msos(template octetstring p_o) := { o := p_o };
  template RawSeqIntCharstring t_msir(template integer p_i, template charstring p_x ) := { i:=p_i, x:=p_x };

  template RawSeqIntStr t_msistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };

  template RawSeqIntBitStr t_msibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };


  //====set of related templates ========

  //==== union related templates ========
  // It caused Seg fault - earlier :)
  //template RawUnionBasicTypes t_mubt_boolean1( template boolean p_b) := { b:= p_b } with { erroneous(b) "value:=omit" }

  //================================================
  //======== Testcases==============================
  //================================================

  //======== {integer}===================
  //omit
  template RawSeqInt t_msi_omit(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= omit" }

  testcase tc_rawSeqIntOmit() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_omit(i)));
      var octetstring expected:= encode_rawSeqEmpty(valueof(t_seqEmpty));
      f_compareAndVerdict(actual, expected);
    }
  }

  //value
  template RawSeqInt t_msi_valueSameTypeE(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= int32:5" }

  testcase tc_rawSeqIntValueSameTypeE() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueSameTypeE(i)));
      var octetstring expected:= encode_rawSeqInt(valueof(t_msi(5)));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueSameTypeI(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= 5" }  //implicit type

  testcase tc_rawSeqIntValueSameTypeI() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueSameTypeI(i)));
      var octetstring expected:= encode_rawSeqInt8(valueof(t_msi8(5)));
      f_compareAndVerdict(actual, expected);
    }
  }

  //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
  template RawSeqInt t_msi_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= boolean:true" }

  testcase tc_rawSeqIntValueDiffTypeExplicitBool() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitBoolean(i)));
      var octetstring expected:= encode_rawSeqBool(valueof(t_msb(true)));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= true" }

  testcase tc_rawSeqIntValueDiffTypeImplicitBool() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitBoolean(i)));
      var octetstring expected:= encode_rawSeqBool(valueof(t_msb(true)));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= octetstring:'42414241'O" } //"BABA"

  testcase tc_rawSeqIntValueDiffTypeExplicitOctStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitOctStr(i)));
      var octetstring expected:= encode_rawSeqOctStr(valueof(t_msos('42414241'O)));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= '42414241'O" }

  testcase tc_rawSeqIntValueDiffTypeImplicitOctStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitOctStr(i)));
      var octetstring expected:= encode_rawSeqOctStr(valueof(t_msos('42414241'O)));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= RawEnum:second" }

  testcase tc_rawSeqIntValueDiffTypeExplicitEnum() runs on RawComp {
    var RawSeqRawEnum vl_msme;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      vl_msme.e:=second;
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitEnum(i)));
      var octetstring expected:= encode_rawSeqRawEnum(vl_msme);
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= charstring:""Albert""" }

  testcase tc_rawSeqIntValueDiffTypeExplicitCharstring() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeExplicitCharstring(i)));
      var octetstring expected:= encode_rawSeqCharstring(valueof(t_msr("Albert")));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= ""Albert""" }

  testcase tc_rawSeqIntValueDiffTypeImplicitCharstring() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof(t_msi_valueDiffTypeImplicitCharstring(i)));
      var octetstring expected:= encode_rawSeqCharstring(valueof(t_msr("Albert")));
      f_compareAndVerdict(actual, expected);
    }
  }

  template RawSeqInt t_msi_valueDiffTypeExplicitString(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= charstring:""subidubi""" }

  testcase tc_rawSeqIntValueDiffTypeExplicitStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual  := encode_rawSeqInt(valueof( t_msi_valueDiffTypeExplicitString(i)));
      var octetstring expected:= encode_rawSeqStr(valueof(t_msstr("subidubi")));
      f_compareAndVerdict(actual, expected);
    }
  }

  //RAW
  template RawSeqInt t_msi_valueDiffTypeRaw(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value(raw):= 'DECAFBAD'O" }

  testcase tc_rawSeqIntValueDiffTypeRawOctStr() runs on RawComp {
    var octetstring vl_expectedValue:= 'DECAFBAD'O;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring vl_actual := encode_rawSeqInt(valueof(t_msi_valueDiffTypeRaw(i)));
      f_compareAndVerdict(vl_actual , vl_expectedValue);
    }
  }
  // ============{integer, integer }==============
  //omit
  template RawSeqInt2 t_msi2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (i) "value:= omit" }

  testcase tc_rawSeqInt2Omiti() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_omiti(i,j)));
      var octetstring etalon := encode_rawSeqInt(valueof(t_msi(j)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value:= omit" }

  testcase tc_rawSeqInt2Omitj() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_omitj(i,j)));
      var octetstring etalon := encode_rawSeqInt(valueof(t_msi(i)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  //before omit j
  template RawSeqInt2 t_msi2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "before:= omit all" }

  testcase tc_rawSeqInt2BeforeOmitj() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_beforeomitj(i,j)));
      var octetstring etalon := encode_rawSeqInt(valueof(t_msi(j)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  //after omit i
  template RawSeqInt2 t_msi2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (i) "after:= omit all" }

  testcase tc_rawSeqInt2AfterOmiti() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_afteromiti(i,j)));
      var octetstring etalon := encode_rawSeqInt(valueof(t_msi(i)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  //value
  template RawSeqInt2 t_msi2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value:= int32 : 5" }

  testcase tc_rawSeqInt2ValueSameTypeE() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i < tsp_maxInt; i := i * tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueSameTypeE(i,j)));
      var octetstring etalon := encode_rawSeqInt2(valueof(t_msi2(i,5)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value := 5" }

  testcase tc_rawSeqInt2ValueSameTypeI() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueSameTypeI(i,j)));
      var octetstring etalon := encode_rawSeqInt28(valueof(t_msi28(i,5)));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value:= charstring:""Albert""" }

  testcase tc_rawSeqInt2ValueDiffTypeExplicitCharstring() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueDiffTypeExplicitCharstring(i,j)));
      var octetstring etalon := encode_rawSeqIntCharstring(valueof(t_msir(i,"Albert")));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value:= ""Albert""" }

  testcase tc_rawSeqInt2ValueDiffTypeImplicitCharstring() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof(t_msi2_valueDiffTypeImplicitCharstring(i,j)));
      var octetstring etalon := encode_rawSeqIntCharstring(valueof(t_msir(i,"Albert")));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_valueDiffTypeExplicitString(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value:= charstring:""subidubi""" }

  testcase tc_rawSeqInt2ValueDiffTypeExplicitStr() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      var octetstring actual := encode_rawSeqInt2(valueof( t_msi2_valueDiffTypeExplicitString(i, j)));
      var octetstring etalon := encode_rawSeqIntStr(valueof(t_msistr(i, "subidubi")));
      f_compareAndVerdict(actual, etalon);
    }
  }

  template RawSeqInt2 t_msi2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value := RawSeqInt2:{1,2}" }

  testcase tc_rawSeqInt2ValueSeqIntV() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSeqInt2(valueof(t_msi2_valueSeqIntV(i,j)))
    var octetstring vl_expected:=  encode_rawSeqIntSeqInt2({10,{1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value := RawSeqInt2opt:{1,2}" }

  testcase tc_rawSeqInt2ValueSeqIntOptV() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSeqInt2(valueof(t_msi2_valueSeqIntOptV(i,j)))
    var octetstring vl_expected:=  encode_rawSeqIntSeqInt2({10,{1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value := RawSeqInt2:c_msi2" }

  testcase tc_rawSeqInt2ValueSeqIntC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSeqInt2(valueof(t_msi2_valueSeqIntC(i,j)))
    var octetstring vl_expected:=  encode_rawSeqIntSeqInt2({10,{1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value := RawSeqInt2opt:c_msi2opt" }

  testcase tc_rawSeqInt2ValueSeqInt2OptC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSeqInt2(valueof(t_msi2_valueSeqIntOptC(i,j)));
    var octetstring vl_expected:=  encode_rawSeqIntSeqInt2({10,{1,2}});
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value:= c_msi2optomit" }

  testcase tc_rawSeqInt2ValueSeqInt2OptOmitC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2OptOmitC(i,j)));
    var octetstring vl_expected:= encode_rawSeqIntSeqInt2optopt({10,{1,omit}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (i) "value:=int32 : c_msi2.i" }

  testcase tc_rawSeqInt2ValueSeqInt2iiC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2iiC(i,j)));
    var octetstring vl_expected:= encode_rawSeqInt2({1,15})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (i) "value:=int32 : c_msi2.j" }

  testcase tc_rawSeqInt2ValueSeqInt2ijC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2ijC(i,j)));
    var octetstring vl_expected:= encode_rawSeqInt2({2,15})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value:=int32 : c_msi2.i" }

  testcase tc_rawSeqInt2ValueSeqInt2jiC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2jiC(i,j)));
    var octetstring vl_expected:= encode_rawSeqInt2({10,1})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqInt2 t_msi2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value:=int32 : c_msi2.j" }

  testcase tc_rawSeqInt2ValueSeqInt2jjC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSeqInt2(valueof(t_msi2_valueSeqInt2jjC(i,j)));
    var octetstring vl_expected:= encode_rawSeqInt2({10,2})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  //=== Sequence { integer, {integer, integer} )
  template RawSeqIntSeqInt2 t_msisi2_omiti(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (i) "value:= omit" };

  testcase tc_rawSeqIntSeqInt2ValueOmiti() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    //var octetstring vl_default :=encode_rawSeqIntSeqInt2(valueof(t_msisi2(i,j,k))); // just to see the unaltered
    // Stream after encoding: '0A0000000F00000010000000'O
    var octetstring vl_encoded :=encode_rawSeqIntSeqInt2(valueof(t_msisi2_omiti(i,j,k)));
    var octetstring vl_expected:=encode_rawSeqIntSeqInt2opt({omit,{15,16}});
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSeqIntSeqInt2 t_msisi2_omitjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (jk.i) "value:= omit" };

  testcase tc_rawSeqIntSeqInt2ValueOmitjki() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_omitjki(i,j,k))),
      encode_rawSeqIntSeqInt2optopt({10,{16,omit}})  );
  }

  template RawSeqIntSeqInt2 t_msisi2_omitjkj(template integer p_i, template integer p_j, template integer p_k) :=
  { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (jk.j) "value:= omit" };

  testcase tc_rawSeqIntSeqInt2ValueOmitjkj() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_omitjkj(i,j,k))),
      encode_rawSeqIntSeqInt2optopt({10,{15,omit}})  );
  }

  template RawSeqIntSeqInt2 t_msisi2_rawjki(template integer p_i, template integer p_j, template integer p_k) :=
  { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (jk.i) "value(raw):= '41424241'O" }; //"ABBA"

  testcase tc_rawSeqIntSeqInt2ValueRawjki() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_rawjki(i,j,k))),
      '0A0000004142424110000000'O);
  }

  template RawSeqIntSeqInt2 t_msisi2_rawjkj(template integer p_i, template integer p_j, template integer p_k) :=
  { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (jk.j) "value(raw):= '41424241'O" };

  testcase tc_rawSeqIntSeqInt2ValueRawjkj() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_rawjkj(i,j,k))),
      '0A0000000F00000041424241'O);
  }

  //After-before:
  template RawSeqIntSeqInt2 t_msisi2_afteribeforej(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with {
    erroneous(i) "after:= '41424241'O";
    erroneous(jk.i) "before:='42414241'O";
  };

  testcase tc_rawSeqIntSeqInt2AfteriBeforej() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_afteribeforej(i,j,k))),
      '0A00000041424241424142410F00000010000000'O);
  }

  template RawSeqIntSeqInt2 t_msisi2_afterirawbeforejraw(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with {
    erroneous(i) "after(raw):= '41424241'O"; //"ABBA"
    erroneous(jk.i) "before(raw):='42414241'O"; //"BABA"
  }; //"ABBA", "BABA"

  testcase tc_rawSeqIntSeqInt2AfteriRawBeforejRaw() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSeqIntSeqInt2(valueof(t_msisi2_afterirawbeforejraw(i,j,k))),
      '0A00000041424241424142410F00000010000000'O);
  }

  //==== {integer, integer, integer, integer} ==============
  //omit
  template RawSeqInt4 t_msi4_omiti(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  with { erroneous (i) "value:= omit" }

  testcase tc_rawSeqInt4Omiti() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_omiti(i,2*i,3*i,4*i))),
        encode_rawSeqInt3(valueof(t_msi3(2*i,3*i,4*i))) )
    }
  }

  template RawSeqInt4 t_msi4_omitj(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  with { erroneous (j) "value:= omit" }

  testcase tc_rawSeqInt4Omitj() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_omitj(i,2*i,3*i,4*i))),
        encode_rawSeqInt3(valueof(t_msi3(i,3*i,4*i))) );
    }
  }

  template RawSeqInt4 t_msi4_omitk(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  with { erroneous (k) "value:= omit" }

  testcase tc_rawSeqInt4Omitk() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_omitk(i,2*i,3*i,4*i))),
        encode_rawSeqInt3(valueof(t_msi3(i,2*i,4*i))) )
    }
  }

  template RawSeqInt4 t_msi4_omitl(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  with { erroneous (l) "value:= omit" }

  testcase tc_rawSeqInt4Omitl() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_omitl(i,2*i,3*i,4*i))),
        encode_rawSeqInt3(valueof(t_msi3(i,2*i,3*i))) )
    }
  }

  template RawSeqInt4 t_msi4_valueiOctetStr(template integer p_i, template integer p_j, template integer p_k, template integer p_l) :=
  {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (i) "value:= 'FEDCBA98'O" }

  template RawSeqOJKL t_msojkl(template octetstring p_o, template integer p_j, template integer p_k,template integer p_l ) :=
  {o:= p_o, j:=p_j, k:=p_k, l:=p_l}

  testcase tc_rawSeqInt4ValueiOctetStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_valueiOctetStr(i,2*i,3*i,4*i))),
        encode_rawSeqOJKL(valueof(t_msojkl('FEDCBA98'O,2*i,3*i, 4*i))) )
    }
  }

  template RawSeqInt4 t_msi4_valuejOctetStr(template integer p_i, template integer p_j, template integer p_k,template integer p_l) :=
  {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (j) "value:= 'FEDCBA98'O" }

  template RawSeqIOKL t_msiokl(template integer p_i, template octetstring p_o, template integer p_k,template integer p_l ) :=
  {i:=p_i,  o:=p_o, k:=p_k, l:=p_l}

  testcase tc_rawSeqInt4ValuejOctetStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_valuejOctetStr(i,2*i,3*i,4*i))),
        encode_rawSeqIOKL(valueof(t_msiokl(i,'FEDCBA98'O,3*i, 4*i))) )
    }
  }

  type record of octetstring RoC;
  type record of integer RoI;

  template RawSeqInt4 t_msi4_valueiRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (i) "value(raw):= '41424241'O" }

  testcase tc_rawSeqInt4ValueiRaw() runs on RawComp {
    var RoC vl_expectedValue:= {
      '41424241020000000300000004000000'O,
      '41424241140000001E00000028000000'O,
      '41424241C80000002C01000090010000'O,
      '41424241D0070000B80B0000A00F0000'O,
      '41424241ECFFFFFFE2FFFFFFD8FFFFFF'O
    }
    //if i=1
    var RoI vl_roi := { 1, 10, 100, 1000,-10};

    var integer i:=0;
    for(var integer index:=0; index<5;index:=index+1) {
      i:=vl_roi[index];
      f_compareAndVerdict(
        encode_rawSeqInt4(valueof(t_msi4_valueiRaw(i,2*i,3*i,4*i))),
        vl_expectedValue[index]);
    }
  }

  template RawSeqInt4 t_msi4_valuejRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (j) "value(raw):= '41424241'O" }

  testcase tc_rawSeqInt4ValuejRaw() runs on RawComp {
    var octetstring vl_expectedValue:= '01000000414242410300000004000000'O;
    var integer i:=1;
    f_compareAndVerdict(
      encode_rawSeqInt4(valueof(t_msi4_valuejRaw(i,2*i,3*i,4*i))),
      vl_expectedValue);
  }

  template RawSeqInt4 t_msi4_valuekRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (k) "value(raw):= '41424241'O" }

  testcase tc_rawSeqInt4ValuekRaw() runs on RawComp {
    var octetstring vl_expectedValue:= '01000000020000004142424104000000'O;
    var integer i:=1;
    f_compareAndVerdict(
      encode_rawSeqInt4(valueof(t_msi4_valuekRaw(i,2*i,3*i,4*i))),
      vl_expectedValue);
  }

  template RawSeqInt4 t_msi4_valuelRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous (l) "value(raw):= '41424241'O" }

  testcase tc_rawSeqInt4ValuelRaw() runs on RawComp {
    var octetstring vl_expectedValue:= '01000000020000000300000041424241'O;
    var integer i:=1
    f_compareAndVerdict(
      encode_rawSeqInt4(valueof(t_msi4_valuelRaw(i,2*i,3*i,4*i))),
      vl_expectedValue);
  }

  //To test if a mandatory structure omitted
  template RawSeqISKL t_msiskl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) :=
  {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous (s)  "value:= omit" }

  testcase tc_rawSeqISKL_ValueSomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_expectedValue:='0A0000001E00000028000000'O;
    f_compareAndVerdict(
      encode_rawSeqISKL(valueof(t_msiskl_valueSomit(10,vl_msi4,30,40))),
      vl_expectedValue);
  }

  template RawSeqISKL t_msiskl_valueSIomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous (s.i)  "value:= omit" }

  testcase tc_rawSeqISKL_ValueSIomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_expectedValue:='0A0000000600000007000000080000001E00000028000000'O;
    f_compareAndVerdict(
      encode_rawSeqISKL(valueof(t_msiskl_valueSIomit(10,vl_msi4,30,40))),
      vl_expectedValue);
  }

  template RawSeqISKL t_msiskl_valueSISJomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with {
    erroneous (s.i)  "value:= omit"
    erroneous (s.j)  "value:= omit"
  }
  testcase tc_rawSeqISKL_ValueSISJomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_expectedValue:='0A00000007000000080000001E00000028000000'O;
    f_compareAndVerdict(
      encode_rawSeqISKL(valueof(t_msiskl_valueSISJomit(10,vl_msi4,30,40))),
      vl_expectedValue);
  }

  template RawSeqISKL t_msiskl_valueSraw(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous (s)  "value(raw):= '41424241'O" }

  testcase tc_rawSeqISKL_ValueSraw() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_expectedValue:= '0A000000414242411E00000028000000'O;
    f_compareAndVerdict(
      encode_rawSeqISKL(valueof(t_msiskl_valueSraw(10,vl_msi4,30,40))),
      vl_expectedValue);
  }

  //===== sequence of sequence of sequence ====
  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omiti(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy}
  with { erroneous(i) "value:=omit"}

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omiti() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_analog:= {{2,{3,4}},{"Albert","Einstein"}};
    var octetstring vl_actual  := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSeqSeqIntSeqInt2SeqCharstring2(vl_analog);
    f_compareAndVerdict(
      vl_actual,
      vl_expected)
  }

  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkl(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on RawComp {
    var RawSeqIntSeqCharstring2 vl_expected:= { 1, {"Albert","Einstein"}};
    var octetstring actual   := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring expected := encode_rawSeqIntSeqCharstring2(vl_expected);
    f_compareAndVerdict(actual, expected);
  }

  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitxy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy}
  with { erroneous(xy) "value:=omit"}

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on RawComp {
    var RawSeqIntSeqIntSeqInt2 vl_expected:= { 1, {2,{3,4}} };
    var octetstring actual   := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring expected := encode_rawSeqIntSeqIntSeqInt2(vl_expected);
    f_compareAndVerdict(actual, expected);
  }

  //...with { erroneous(jkl.jk.j) "value:=omit"}
  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_omitjkll(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy}
  with { erroneous(jkl.jk.j) "value:=omit"}

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on RawComp {
    var RawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected:= {1,{2,{3,omit}}, {"Albert","Einstein"}};
    var octetstring vl_actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
      valueof(t_msisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} )))
    var octetstring vl_etalon := encode_rawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected)
    f_compareAndVerdict(vl_actual , vl_etalon);
  }

  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuexy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=RawSeqCharstring2:{""Bonnie"",""Tyler""}"}

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on RawComp {
    //var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_msisisi2r2;
    var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Bonnie","Tyler"}};
    var octetstring actual   := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
      valueof(t_msisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(vl_expected)
    f_compareAndVerdict(actual, expected);
  }

  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
    erroneous(xy.x) "value:=charstring:""Albert""";
    erroneous(xy.y) "value:=charstring:""Einstein"""
  }

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on RawComp {
    var RawSeqIntSeqIntSeqInt2SeqCharstring2 vl_expected:= {1,{2,{3,4}}, {"Albert","Einstein"}};
    var octetstring actual   := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(
        valueof(t_msisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(vl_expected)
    f_compareAndVerdict(actual, expected);
  }

  // Expression evaluation in attribue section:
  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr1(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i := p_i, jkl := p_jkl, xy := p_xy }
  with {
    erroneous(xy.x) "value := int32 : 9 * 5"
    erroneous(xy.y) "value := int32 : 16 * 4"
  }

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1() runs on RawComp {
    var RawSeqIntSeqIntSeqInt2SeqInt2 vl_expected:= { 1, { 2, { 3, 4 } }, { 45, 64 } }
    var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr1(1, { 2, { 3, 4 } }, { "Albert", "Four" })))
    var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqInt2(vl_expected)
    // Expected: '010200000003000000040000002D00000040000000'O
    f_compareAndVerdict(actual, expected);
  }

  template RawSeqIntSeqIntSeqInt2SeqCharstring2 t_msisisi2r2_valuex_y_expr2(template integer p_i, template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i := p_i, jkl := p_jkl, xy := p_xy }
  with {
    erroneous(xy.x) "value := int32 : (1 + 10 * (2 + 10 * (3 + 10 * (4 + 10 * (5 + 10 * 6)))))"  // Horner
    erroneous(xy.y) "value := int32 : 16 / 5"
  }

  testcase tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2() runs on RawComp {
    var RawSeqIntSeqIntSeqInt2SeqInt2 vl_expected:= { 1, { 2, { 3, 4 } }, { 654321, 3 } }
    var octetstring actual := encode_rawSeqIntSeqIntSeqInt2SeqCharstring2(valueof(t_msisisi2r2_valuex_y_expr2(1, { 2, { 3, 4 } }, { "Albert", "Four" })))
    var octetstring expected := encode_rawSeqIntSeqIntSeqInt2SeqInt2(vl_expected)
    // Expected: '01020000000300000004000000F1FB090003000000'O
    f_compareAndVerdict(actual, expected)
  }

  template RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msssi2sr2ssi2sr2_omit(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2)
  :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }

  testcase tc_RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var RawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
    var octetstring actual   := encode_rawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msssi2sr2ssi2sr2_omit(vl_s1, vl_s2)));
    var octetstring expected := encode_rawSeq_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_expected);
    f_compareAndVerdict(actual, expected);
  }

  // perturbing an omitted value
  // before
  const RawSeqIntSeqInt2opt c_r2bp := { 42, {13, 17} }
  with { erroneous (i) "before := ""=42"" " };

  const RawSeqIntSeqInt2opt c_r2bo := { omit, {13, 17} }
  with { erroneous (i) "before := ""=42"" " };

  testcase tc_RawSeqInt2opt_before () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2bp);
    var octetstring expected := '3D3432'O & '2A000000'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2bo);
    expected := '3D3432'O & ''O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);
  }

  const RawSeqIntSeqInt2opt c_r2bpr := { 42, {13, 17} }
  with { erroneous (i) "before(raw) := '42'O " };

  const RawSeqIntSeqInt2opt c_r2bor := { omit, {13, 17} }
  with { erroneous (i) "before(raw) := '42'O " };

  testcase tc_RawSeqInt2opt_before_raw () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2bpr);
    var octetstring expected := '42'O & '2A000000'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2bor);
    expected := '42'O & ''O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);
  }

  // value replacement
  const RawSeqIntSeqInt2opt c_r2vp := { 42, {13, 17} }
  with { erroneous (i) "value := ""=42"" " };

  const RawSeqIntSeqInt2opt c_r2vo := { omit, {13, 17} }
  with { erroneous (i) "value := ""=42"" " };

  testcase tc_RawSeqInt2opt_value () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2vp);
    var octetstring expected := '3D3432'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2vo);
    //expected should be the same
    f_compareAndVerdict(actual, expected);
  }

  const RawSeqIntSeqInt2opt c_r2vpr := { 42, {13, 17} }
  with { erroneous (i) "value(raw) := '42'O " };

  const RawSeqIntSeqInt2opt c_r2vor := { omit, {13, 17} }
  with { erroneous (i) "value(raw) := '42'O " };

  testcase tc_RawSeqInt2opt_value_raw () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2vpr);
    var octetstring expected := '42'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2vor);
    //expected should be the same
    f_compareAndVerdict(actual, expected);
  }

  // after
  const RawSeqIntSeqInt2opt c_r2ap := { 42, {13, 17} }
  with { erroneous (i) "after := ""=42"" " };

  const RawSeqIntSeqInt2opt c_r2ao := { omit, {13, 17} }
  with { erroneous (i) "after := ""=42"" " };

  testcase tc_RawSeqInt2opt_after () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2ap);
    var octetstring expected := '2A000000'O & '3D3432'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2ao);
    expected := ''O & '3D3432'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);
  }

  const RawSeqIntSeqInt2opt c_r2apr := { 42, {13, 17} }
  with { erroneous (i) "after(raw) := '42'O " };

  const RawSeqIntSeqInt2opt c_r2aor := { omit, {13, 17} }
  with { erroneous (i) "after(raw) := '42'O " };

  testcase tc_RawSeqInt2opt_after_raw () runs on RawComp {
    //
    var octetstring actual := encode_rawSeqIntSeqInt2opt(c_r2apr);
    var octetstring expected := '2A000000'O & '42'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);

    actual := encode_rawSeqIntSeqInt2opt(c_r2aor);
    expected := ''O & '42'O & '0D00000011000000'O;
    f_compareAndVerdict(actual, expected);
  }

}//group Sequences

group SequenceOf {
  //====sequence of related templates====
  template RawSeqOfBool  t_msob(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
  template RawSeqOfInt   t_msoi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
  template RawSeqOfRawEnum t_msome(template RawEnum p_e1, template RawEnum p_e2,template RawEnum p_e3) := {p_e1,p_e2,p_e3};
  template RawSeqOfCharstring  t_msor(template  charstring p_f1, template charstring p_f2, template charstring p_f3, template charstring p_f4):= {p_f1, p_f2,p_f3,p_f4}
  template RawSeqOfBitStr t_msobs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
  template RawSeqOfOctStr t_msoos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}

  // This would cause compilation error - correct behavior:
  //template RawSeqOfBool  t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  // with {  erroneous ([0]) "after:=omit all"; erroneous ([1]) "value:= 4" };

  //INTEGER

  template RawSeqOfInt  t_msoiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSeqOfInt  t_msoiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //RawEnum
  template RawSeqOfRawEnum  t_msoeValueDiffType(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
  template RawSeqOfRawEnum  t_msoeValueDiffTypeRaw(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
  template RawSeqOfRawEnum  t_msoeBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };
  template RawSeqOfRawEnum  t_msoeIntValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
  template RawSeqOfRawEnum  t_msoeCharStrValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
  template RawSeqOfRawEnum  t_msoeBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };
  template RawSeqOfRawEnum  t_msoeIntValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSeqOfRawEnum  t_msoeCharStrValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSeqOfRawEnum  t_msoeCharStrValueBeforeOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  template RawSeqOfRawEnum  t_msoeAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };
  template RawSeqOfRawEnum  t_msoeIntValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSeqOfRawEnum  t_msoeCharStrValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSeqOfRawEnum  t_msoeCharStrValueAfterOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //Charstring (charstring):
  template RawSeqOfCharstring  t_msorValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
  template RawSeqOfCharstring  t_msorValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };
  template RawSeqOfCharstring  t_msorBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };
  template RawSeqOfCharstring  t_msorIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
  template RawSeqOfCharstring  t_msorCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
  template RawSeqOfCharstring  t_msorBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };
  template RawSeqOfCharstring  t_msorIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSeqOfCharstring  t_msorCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSeqOfCharstring  t_msorCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  template RawSeqOfCharstring  t_msorAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };
  template RawSeqOfCharstring  t_msorIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSeqOfCharstring  t_msorCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSeqOfCharstring  t_msorCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //more complex:

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeomitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "before:=omit all"  erroneous([1].jkl.jk.i) "after:=omit all"}

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_beforeafteromit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "before:=omit all"  erroneous([1].jkl.jk.i) "after:=omit all"}

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_omit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.i, [0].jkl.jk.j, [0].xy.x) "value:=omit"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_afteromit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_arglist_beforeomit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
  //============ Testcases====================
  //Testcase of same type
  template RawSeqOfBool  t_msobValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };

  testcase tc_RawSeqOfBoolValueSameType1() runs on RawComp {
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueSameType(false, false,false))),
      encode_rawSeqOfBool(valueof(t_msob(true, false, true))));
  }

  testcase tc_RawSeqOfBoolValueSameType2() runs on RawComp {
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueSameType(true, true,true))),
      encode_rawSeqOfBool(valueof(t_msob(true, true, true))));
  }

  template RawSeqOfBool  t_msobValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= int32 : 2011" };

  testcase tc_RawSeqOfBoolValueDiffType() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueDiffType(true, true,true))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  template RawSeqOfBool  t_msobValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value(raw):='41424142'O"; erroneous ([2]) "value:= int32 : 2011" };

  testcase tc_RawSeqOfBoolValueRaw() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {r:="ABAB"}, {b:=true}, {i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueDiffTypeRaw(true, true,true))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  template RawSeqOfBool  t_msobValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };

  testcase tc_RawSeqOfBoolValueOmit() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueOmit(false, false,true))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "after:=omit all" };

  testcase tc_RawSeqOfBoolAfterOmit() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=false} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobAfterOmit(false, true,true))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };

  testcase tc_RawSeqOfBoolValueAfterOmit() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueAfterOmit(false, false,false))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([2]) "before:=omit all" };

  testcase tc_RawSeqOfBoolBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobBeforeOmit2(false, false,true))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };

  testcase tc_RawSeqOfBoolValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueBeforeOmit2(false, false,false))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([1]) "before:=omit all" };

  testcase tc_RawSeqOfBoolBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=false},{b:=true}  };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobBeforeOmit1(true, false,true))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfBool  t_msobValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };

  testcase tc_RawSeqOfBoolValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {b:=true},{b:=false} };
    f_compareAndVerdict(
      encode_rawSeqOfBool(valueof(t_msobValueBeforeOmit1(false, false,false))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  //INTEGER
  template RawSeqOfInt  t_msoiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""bubu"""; erroneous ([2]) "value:= true" };

  testcase tc_RawSeqOfIntValueDiffType() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}, {i:=2}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiValueDiffType(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '41424241'O"; erroneous ([2]) "value:= true" };

  testcase tc_RawSeqOfIntValueDiffTypeRaw() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {i:=2}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiValueDiffTypeRaw(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };

  testcase tc_RawSeqOfIntBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {i:=3} };
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiBeforeOmit2(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};

  testcase tc_RawSeqOfIntIntValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiIntValueBeforeOmit2(1,2,3))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  template RawSeqOfInt  t_msoiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  testcase tc_RawSeqOfIntCharStrValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit2(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };

  testcase tc_RawSeqOfIntBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {i:=2},{i:=3} };
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiBeforeOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt32  t_msoiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};

  testcase tc_RawSeqOfIntIntValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {i:=3}};
    f_compareAndVerdict(
      encode_rawSeqOfInt32(valueof(t_msoiIntValueBeforeOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  template RawSeqOfInt  t_msoiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};

  testcase tc_RawSeqOfIntCharStrValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  testcase tc_RawSeqOfIntCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiCharStrValueBeforeOmit1_2(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt  t_msoiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };

  testcase tc_RawSeqOfIntAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={  {i:=1}, {i:=2} } ;
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiAfterOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  template RawSeqOfInt32  t_msoiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};

  testcase tc_RawSeqOfIntIntValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=1},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfInt32(valueof(t_msoiIntValueAfterOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSeqOfIntCharStrValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiCharStrValueAfterOmit1(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfIntCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
    f_compareAndVerdict(
      encode_rawSeqOfInt(valueof(t_msoiCharStrValueAfterOmit1_2(1,2,3))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  //RawEnum
  testcase tc_RawSeqOfRawEnumValueDiffType() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeValueDiffType(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumValueDiffTypeRaw() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {e:=second}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeValueDiffTypeRaw(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {e:=third} };
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeBeforeOmit2(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumIntValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeIntValueBeforeOmit2(first, second, third))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit2(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {e:=second},{e:=third} };
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeBeforeOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumIntValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {e:=third}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeIntValueBeforeOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueBeforeOmit1_2(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={  {e:=first}, {e:=second} } ;
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeAfterOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumIntValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {e:=first},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeIntValueAfterOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumCharStrValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueAfterOmit1(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfRawEnumCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
    f_compareAndVerdict(
      encode_rawSeqOfRawEnum(valueof(t_msoeCharStrValueAfterOmit1_2(first, second, third))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  //Charstring (Charstring)
  testcase tc_RawSeqOfCharstringValueDiffType() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorValueDiffType("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringValueDiffTypeRaw() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="ABBA"}, {r:="Two"}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorValueDiffTypeRaw("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="Three"} };
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorBeforeOmit2("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringIntValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorIntValueBeforeOmit2("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit2("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorBeforeOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringIntValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {i:=2011}, {r:="Three"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorIntValueBeforeOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSeqOfCharstringAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={  {r:="One"}, {r:="Two"} } ;
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorAfterOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringIntValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT32 vl_expected :={ {r:="One"},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorIntValueAfterOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringCharStrValueAfterOmit1() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSeqOfCharstringCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSeqOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
    f_compareAndVerdict(
      encode_rawSeqOfCharstring(valueof(t_msorCharStrValueAfterOmit1_2("One", "Two", "Three"))),
      encode_rawSeqOfRawUnionBT( vl_expected ));
  }
  //BIT STRING
  //OCTET STRING

  //More complex:

  template RawSeqOfSeqSeqIntSeqInt2SeqCharstring2 t_msossisi2sr2_omitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "value:=omit" }

  testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2, omit}}, {"Three","Four"} }, { omit,{5,{6,7}}, {"Seven", "Eight"}} }
    f_compareAndVerdict(
      encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_omitj(vl_s1, vl_s2))),
      encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));

  }

  testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2  vl_expected := { { omit,{1,{3,omit}}, {"Three","Four"} }, { omit,{5,{6,omit}}, {"Seven", "Eight"}} }
    f_compareAndVerdict(
      encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_beforeafteromit(vl_s1, vl_s2))),
      encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));

  }

  testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{omit,{2,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
    f_compareAndVerdict(
      encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_omit(vl_s1, vl_s2))),
      encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
  }

  testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var  RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{2,omit}}, {"Three",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
    f_compareAndVerdict(
      encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_afteromit(vl_s1, vl_s2))),
      encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
  }
  testcase tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={ {1,{2,3}}, {"Three","Four"} }, vl_s2:= {{5,{6,7}}, {"Seven", "Eight"}};
    var RawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2 vl_expected := { { omit,{1,{3,omit}}, {"Four",omit} }, { omit,{5,{6,omit}}, {"Seven",omit}} }
    f_compareAndVerdict(
      encode_rawSeqOfSeqSeqIntSeqInt2SeqCharstring2(valueof(t_msossisi2sr2_arglist_beforeomit(vl_s1, vl_s2))),
      encode_rawSeqOfRawSeqIntSeqIntSeqInt2optoptSeqCharstring2(vl_expected));
  }
}//SequenceOf

group Set {
  //template RawSetInt2opt t_mseti2opt := { i:= 1, j := 2 }
  template RawSetInt2opt t_mseti2optomit := { i:= 1, j := omit }
  const RawSetInt2 c_mseti2 := { i:= 1, j := 2 }
  const RawSetInt2opt c_mseti2opt := { i:= 1, j := 2 }
  const RawSetInt2opt c_mseti2optomit := { i:= 1, j := omit }

  template RawSetEmpty t_setEmpty :={}
  template RawSetBool t_msetb(template boolean p_b) := {b:= p_b}
  //template RawSetNull t_msetn := { n:= NULL }

  template RawSetInt t_mseti(template integer p_i) := {i:= p_i}
  template RawSetInt8 t_mseti8(template integer p_i) := {i:= p_i}
  template RawSetInt t_mseti_omit(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= omit" }
  template RawSetInt t_mseti_valueSameTypeE(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= int32 : 5" }

  //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
  template RawSetInt t_mseti_valueDiffTypeExplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= boolean:true" }
  template RawSetInt t_mseti_valueDiffTypeImplicitBoolean(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= true" }

  //NegTestTestcases.ttcn:74.3-86: error: Type `NULL' and type `@NegTestTypes.RawSetInt' have no common encoding
  template RawSetInt t_mseti_valueDiffTypeExplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= octetstring:'42414241'O" }
  template RawSetInt t_mseti_valueDiffTypeImplicitOctStr(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= '42414241'O" }
  template RawSetInt t_mseti_valueDiffTypeExplicitEnum(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= RawEnum:second" }
  template RawSetInt t_mseti_valueDiffTypeExplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= charstring:""Albert""" }
  template RawSetInt t_mseti_valueDiffTypeImplicitCharstring(template integer p_i) := {i:= p_i} with { erroneous (i) "value:= ""Albert""" }

  template RawSetInt2opt   t_mseti2opt  (template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  template RawSetInt2opt32 t_mseti2opt32(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  template RawSetInt2 t_mseti2_omiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
  template RawSetInt2 t_mseti2_omitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
  //template RawSetInt2 t_mseti2_beforeomiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "before:= omit all" }
  template RawSetInt2 t_mseti2_beforeomitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (i) "value:= omit" }
  template RawSetInt2 t_mseti2_afteromiti(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= omit" }
  //template RawSetInt2 t_mseti2_afteromitj(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "after:= omit all" }
  template RawSetInt2 t_mseti2_valueSameTypeE(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= RawSetInt2.j:5" } //tagged replacement
  template RawSetInt2 t_mseti2_valueDiffTypeExplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= charstring:""Albert""" }
  template RawSetInt2 t_mseti2_valueDiffTypeImplicitCharstring(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j} with { erroneous (j) "value:= ""Albert""" }
  //variable related values:
  template RawSetInt2 t_mseti2_valueSeqIntV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2:{i:=1,j:=2}" }
  template RawSetInt2 t_mseti2_valueSeqIntOptV(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2opt:{i:=1,j:=2}" }
  template RawSetInt2 t_mseti2_valueSeqIntC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2:c_msi2" }
  template RawSetInt2 t_mseti2_valueSeqIntOptC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value := RawSeqInt2opt:c_msi2opt" }
  template RawSetInt2 t_mseti2_valueSeqInt2OptOmitC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:= c_msi2optomit" }
  template RawSetInt2 t_mseti2_valueSeqInt2iiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (i) "value:=c_mseti2.i" };
  template RawSetInt2 t_mseti2_valueSeqInt2jjC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_mseti2.j" };

  template RawSetInt2 t_mseti2_valueSeqIntOptFieldC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j} with { erroneous (j) "value:=c_msi2opt.j" } ;//2
  template RawSetIntSeqInt2 t_msetisi2_trial(template integer p_i, template integer p_j, template integer p_k) := { i:=p_i, jk:={ i:= p_j,j:= p_k} } //not used yet
  template RawSetIntSeqInt2 t_msetisi2(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} };
  template RawSetIntSeqInt2 t_msetisi2_omitjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with { erroneous (jk.i) "value:= omit" };
  template RawSetIntSeqInt2 t_msetisi2_omitjkj(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with { erroneous (jk.j) "value:= omit" };
  template RawSetIntSeqInt2 t_msetisi2_rawjki(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
    erroneous (jk.i) "value(raw):= '41424241'O" };
  template RawSetIntSeqInt2 t_msetisi2_rawjkj(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
    erroneous (jk.j) "value(raw):= '41424241'O" };
  template RawSetIntSeqInt2 t_msetisi2_afteribeforej(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
    erroneous(i) "after:= '41424241'O";
    erroneous(jk.i) "before:='42414241'O"
  };
  template RawSetIntSeqInt2 t_msetisi2_afterirawbeforejraw(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} } with {
    erroneous(i)    "after(raw):= '41424241'O"; //"ABBA"
    erroneous(jk.i) "before(raw):='42414241'O" //"BABA"
  };
  //
  template RawSetInt3 t_mseti3(template integer p_i, template integer p_j, template integer p_k) := {i:= p_i, j:=p_j, k:=p_k}

  template RawSetInt4 t_mseti4(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  template RawSetInt4opt t_mseti4opt(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  template RawSetInt4 t_mseti4_omiti(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (i) "value:= omit" }
  template RawSetInt4 t_mseti4_omitj(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (j) "value:= omit" }
  template RawSetInt4 t_mseti4_omitk(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l} with { erroneous (k) "value:= omit" }
  template RawSetInt4 t_mseti4_omitl(template integer p_i, template integer p_j, template integer p_k,template integer p_l ) := {i:= p_i, j:=p_j, k:=p_k, l:=p_l}
  with { erroneous (l) "value:= omit" }
  template RawSetInt4 t_mseti4_valueiOctetStr(template integer p_i, template integer p_j, template integer p_k, template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(i) "value:= 'FEDCBA98'O" }
  template RawSetInt4 t_mseti4_valuejOctetStr(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(j) "value:= 'FEDCBA98'O" }

  template RawSetInt4 t_mseti4_valueiRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(i) "value(raw):= '41424241'O" }

  template RawSetInt4 t_mseti4_valuejRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(j) "value(raw):= '41424241'O" }

  template RawSetInt4 t_mseti4_valuekRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(k) "value(raw):= '41424241'O" }

  template RawSetInt4 t_mseti4_valuelRaw(template integer p_i, template integer p_j, template integer p_k,template integer p_l) := {i:= p_i, j:=p_j, k:=p_k,l:=p_l}
  with { erroneous(l) "value(raw):= '41424241'O" }

  template RawSetOJKL t_msetojkl(template octetstring p_o, template integer p_j, template integer p_k,template integer p_l ) := {o:= p_o, j:=p_j, k:=p_k, l:=p_l}
  template RawSetIOKL t_msetiokl(template integer p_i, template octetstring p_o, template integer p_k,template integer p_l ) := {i:=p_i,  o:=p_o, k:=p_k, l:=p_l}

  template RawSetISKL t_msetiskl(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  template RawSetIS2KLopt t_msetis2klopt(template integer p_i, template RawSeqInt2 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  template RawSetISKL t_msetiskl_valueSISJomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l} with {
    erroneous(s.i)  "value:= omit"
    erroneous(s.j)  "value:= omit"}

  template RawSetISOKL t_msetisokl(template integer p_i, template RawSeqInt4 p_s, template octetstring p_o, template integer p_k, template integer p_l ) :=
  {i:=p_i,  s:=p_s, o:=p_o, k:=p_k, l:=p_l}
  template RawSetISOKLopt t_msetisoklopt(template integer p_i, template RawSeqInt4opt p_s,template octetstring p_o, template integer p_k, template integer p_l ) :=
  {i:=p_i,  s:=p_s, o:=p_o, k:=p_k, l:=p_l}
  template RawSetISOKL t_msetisokl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template octetstring p_o, template integer p_k,template integer p_l ) :=
  {i:=p_i,  s:=p_s, o:=p_o, k:=p_k, l:=p_l} with {
    erroneous(s)  "value:= omit" }
  template RawSetIOSKLopt t_msetiosklopt(template integer p_i, template octetstring p_o,template RawSeqInt4opt p_s, template integer p_k, template integer p_l ) :=
  {i:=p_i, o:=p_o, s:=p_s,  k:=p_k, l:=p_l}
  template RawSetIOSKL t_msetioskl_valueSomit(template integer p_i, template octetstring p_o, template RawSeqInt4 p_s,  template integer p_k,template integer p_l ) :=
  {i:=p_i,  o:=p_o,  s:=p_s,k:=p_k, l:=p_l} with {
    erroneous(s)  "value:= omit" }
  //===seq of seq of seq:==

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omiti(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(i) "value:=omit"}

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkl(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl) "value:=omit"}

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitxy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=omit"}

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuexy(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(xy) "value:=RawSetCharstring2:{x:=""Albert"",y:=""Einstein""}"}

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
    erroneous(xy.x) "value:=charstring:""Albert""";
    erroneous(xy.y) "value:=charstring:""Einstein"""
  }

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_valuex_y_expr1(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with {
    erroneous(xy.x) "value:=charstring:""Albert""";
    erroneous(xy.y) "value:=charstring:""Einstein"""
  }

  template RawSetIntSeqIntSeqInt2SeqCharstring2 t_msetisisi2r2_omitjkll(template integer p_i,template RawSeqIntSeqInt2 p_jkl, template RawSeqCharstring2 p_xy) :=
  { i:=p_i, jkl:=p_jkl, xy:=p_xy} with { erroneous(jkl.jk.j) "value:=omit"}

  //Set of depth 3:

  template RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2 t_msetssi2sr2ssi2sr2_omit(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2)
  :={ s1:=p_s1,s2:=p_s2} with { erroneous(s1.jkl.jk.j) "value:=omit" }

  //real (charstring)
  template RawSetCharstring t_msetr(template charstring p_x) := { x:=p_x }
  template RawSetCharstring2 t_msetr2(template charstring p_x, template charstring p_y):={x:=p_x, y:=p_y}

  //charstring->VisibleString
  template RawSetStr t_msetstr(template charstring p_s) := { s := p_s }

  //bitstring:
  template RawSetBitStr t_msetbitstr(template bitstring p_b) := { b := p_b };
  template RawSetOctStr t_msetos(template octetstring p_o) := { o := p_o };
  template RawSetIntCharstring t_msetir(template integer p_i, template charstring p_f ) := { i:=p_i, f:=p_f };

  template RawSetIntStr t_msetistr(template integer p_i, template charstring p_s ) := { i:=p_i, s:=p_s };

  template RawSetIntBitStr t_msetibitstr(template integer p_i, template bitstring p_b ) := { i:=p_i, b:=p_b };


  //================================================
  //======== Testcases==============================
  //================================================

  //======== {integer}===================
  //omit
  testcase tc_RawSetIntOmit() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_omit(i))),
        encode_rawSetEmpty(valueof(t_setEmpty)) );
    }
  }

  testcase tc_RawSetIntValueSameTypeE() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueSameTypeE(i))),
        encode_rawSetInt(valueof(t_mseti(5)))  );
    }
  }

  template RawSetInt t_mseti_valueSameTypeI(template integer p_i) := {i:= p_i}
  with { erroneous (i) "value:= 5" }  //implicit type

  testcase tc_RawSetIntValueSameTypeI() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueSameTypeI(i))),
        encode_rawSetInt8(valueof(t_mseti8(5)))  );
    }
  }

  //Basic ASN.1 types (eq ttcn types): boolean, integer, octetstring, bitstring, null, objid, ext. objid, enum, embedded pdv, charstring (real), UTFSTR, seq, seq of
  testcase tc_RawSetIntValueDiffTypeExplicitBool() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitBoolean(i))),
        encode_rawSetBool(valueof(t_msetb(true)))  );
    }
  }
  testcase tc_RawSetIntValueDiffTypeImplicitBool() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitBoolean(i))),
        encode_rawSetBool(valueof(t_msetb(true)))  );
    }
  }

  //   testcase tc_RawSetIntValueDiffTypeExplicitNull() runs on RawComp {
  //     for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
  //       log("i: ",i );
  //       f_compareAndVerdict(
  //         encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitNull(i))),
  //         encode_rawSetNull(valueof(t_msetn))  );
  //     }
  //   }
  //   testcase tc_RawSetIntValueDiffTypeImplicitNull() runs on RawComp {
  //     for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
  //       log("i: ",i );
  //       f_compareAndVerdict(
  //         encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitNull(i))),
  //         encode_rawSetNull(valueof(t_msetn))) ;
  //     }
  //   }


  testcase tc_RawSetIntValueDiffTypeExplicitOctStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      var octetstring vl_encoded:=encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitOctStr(i)));
      log(vl_encoded);
      var octetstring vl_expected:=encode_rawSetOctStr(valueof(t_msetos('42414241'O)));
      log(vl_expected);
      f_compareAndVerdict( vl_encoded,vl_expected);
    }
  }
  testcase tc_RawSetIntValueDiffTypeImplicitOctStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitOctStr(i))),
        encode_rawSetOctStr(valueof(t_msetos('42414241'O)))) ;
    }
  }

  const RawSetInt c_mseti_valueDiffTypeExplicitOctStr := {i:= 1} with { erroneous (i) "value:= octetstring:'42414241'O" }

  testcase tc_RawSetIntValueDiffTypeExplicitOctStr_const() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      var octetstring vl_encoded:=encode_rawSetInt( c_mseti_valueDiffTypeExplicitOctStr);
      log(vl_encoded);
      var octetstring vl_expected:=encode_rawSetOctStr(valueof(t_msetos('42414241'O)));
      log(vl_expected);
      f_compareAndVerdict( vl_encoded,vl_expected);
    }
  }
  testcase tc_RawSetIntValueDiffTypeExplicitEnum() runs on RawComp {
    var RawSetRawEnum vl_msme;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      vl_msme.e:=second;
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitEnum(i))),
        encode_rawSetRawEnum(vl_msme) );
    }
  }
  testcase tc_RawSetIntValueDiffTypeExplicitCharstring() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeExplicitCharstring(i))),
        encode_rawSetCharstring(valueof(t_msetr("Albert")))  );
    }
  }

  testcase tc_RawSetIntValueDiffTypeImplicitCharstring() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt(valueof(t_mseti_valueDiffTypeImplicitCharstring(i))),
        encode_rawSetCharstring(valueof(t_msetr("Albert"))));
    }
  }

  //RAW
  template RawSetInt t_mseti_valueDiffTypeRaw(template integer p_i) := {i:= p_i} with
  { erroneous (i) "value(raw):= '4141'O" }

  testcase tc_RawSetIntValueDiffTypeRawOctStr() runs on RawComp {
    var octetstring vl_expected := char2oct("AA");
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      var octetstring vl_encoded  := encode_rawSetInt(valueof(t_mseti_valueDiffTypeRaw(i)));
      f_compareAndVerdict(vl_encoded , vl_expected);
    }
  }
  // ============{integer, integer }==============
  //omit
  testcase tc_RawSetInt2Omiti() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_omiti(i,j))), //encoded
        encode_rawSetInt2opt32(valueof(t_mseti2opt32(omit,j))) );        //expected
    }

  }

  testcase tc_RawSetInt2Omitj() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_omitj(i,j))),//encoded
        encode_rawSetInt2opt(valueof(t_mseti2opt(i, omit))) ); //expected
    }
  }


  //before omit j
  testcase tc_RawSetInt2BeforeOmitj() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_beforeomitj(i,j))),//encoded
        encode_rawSetInt2opt32(valueof(t_mseti2opt32(omit,j)))  ); //expected
    }
  }

  //after omit i
  testcase tc_RawSetInt2AfterOmiti() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_afteromiti(i,j))),//encoded
        encode_rawSetInt2opt(valueof(t_mseti2opt(i, omit))));//expected
    }

  }

  testcase tc_RawSetInt2ValueSameTypeE() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_valueSameTypeE(i,j))),//encoded
        encode_rawSetInt2opt32(valueof(t_mseti2opt32(i,5))) );          //expected
    }
  }

  template RawSetInt2 t_mseti2_valueSameTypeI(template integer p_i, template integer p_j) := {i:= p_i, j:=p_j}
  with { erroneous (j) "value := 5" }

  testcase tc_RawSetInt2ValueSameTypeI() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_valueSameTypeI(i,j))),//encoded
        encode_rawSetInt2opt(valueof(t_mseti2opt(i,5))));              //expected
    }
  }

  testcase tc_RawSetInt2ValueDiffTypeExplicitCharstring() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_valueDiffTypeExplicitCharstring(i,j))),//encoded
        encode_rawSetIntCharstring(valueof(t_msetir(i,"Albert"))));                     //expected
    }
  }

  testcase tc_RawSetInt2ValueDiffTypeImplicitCharstring() runs on RawComp {
    var integer j:= 255;
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i );
      f_compareAndVerdict(
        encode_rawSetInt2(valueof(t_mseti2_valueDiffTypeImplicitCharstring(i,j))),//encoded
        encode_rawSetIntCharstring(valueof(t_msetir(i,"Albert")))); //expected
    }
  }

  testcase tc_RawSetInt2ValueSeqIntV() runs on RawComp {
    var integer i:= 10, j:= 15;
    //var RawSetIntSeqInt2T vl_expectedT:={i:=10,jk:={1,2}};
    var octetstring vl_encoded :=  encode_rawSetInt2(valueof(t_mseti2_valueSeqIntV(i,j)))
    var octetstring vl_expected:=  encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  testcase tc_RawSetInt2ValueSeqIntOptV() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSetInt2(valueof(t_mseti2_valueSeqIntOptV(i,j)))
    var octetstring vl_expected:=  encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  testcase tc_RawSetInt2ValueSeqIntC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSetInt2(valueof(t_mseti2_valueSeqIntC(i,j)))
    var octetstring vl_expected:=  encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  testcase tc_RawSetInt2ValueSeqInt2OptC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded :=  encode_rawSetInt2(valueof(t_mseti2_valueSeqIntOptC(i,j)));
    var octetstring vl_expected:=  encode_rawSetIntSeqInt2T({i:=10,jk:={1,2}});
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  testcase tc_RawSetInt2ValueSeqInt2OptOmitC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2OptOmitC(i,j)));
    var octetstring vl_expected:= encode_rawSetIntSeqInt2Toptopt({i:=10,jk:={1,omit}})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }
  testcase tc_RawSetInt2ValueSeqInt2iiC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2iiC(i,j)));
    var octetstring vl_expected:= encode_rawSetInt2({i:=1,j:=15})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  //not possible - two field with the same tag:
  template RawSetInt2 t_mseti2_valueSeqInt2ijC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (i) "value:=c_mseti2.j" };

  testcase tc_RawSetInt2ValueSeqInt2ijC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2ijC(i,j)));
    var octetstring vl_expected:= encode_rawSetInt2({i:=2,j:=15})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  template RawSetInt2 t_mseti2_valueSeqInt2jiC(template integer p_i, template integer p_j):={i:=p_i, j:=p_j}
  with { erroneous (j) "value:=c_mseti2.i" };

  testcase tc_RawSetInt2ValueSeqInt2jiC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2jiC(i,j)));
    var octetstring vl_expected:= encode_rawSetInt2({i:=10,j:=1})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }

  testcase tc_RawSetInt2ValueSeqInt2jjC() runs on RawComp {
    var integer i:= 10, j:= 15;
    var octetstring vl_encoded := encode_rawSetInt2(valueof(t_mseti2_valueSeqInt2jjC(i,j)));
    var octetstring vl_expected:= encode_rawSetInt2({i:=10,j:=2})
    f_compareAndVerdict(vl_encoded,vl_expected);
  }
  //=== Set { integer, {integer, integer} )
  template RawSetIntSeqInt2 t_msetisi2_omiti(template integer p_i, template integer p_j, template integer p_k) := { i:= p_i, jk:= { i:=p_j, j:=p_k} }
  with { erroneous (i) "value:= omit" };

  testcase tc_RawSetIntSeqInt2ValueOmiti() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    var octetstring vl_encoded :=encode_rawSetIntSeqInt2(valueof(t_msetisi2_omiti(i,j,k)))
    var octetstring vl_expected:=encode_rawSetIntSeqInt2opt({i:=omit,jk:={15,16}})
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqInt2ValueOmitjki() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    f_compareAndVerdict(
      encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjki(i,j,k))),
      encode_rawSetIntSeqInt2optopt({i:=10,jk:={16,omit}}) );
  }

  testcase tc_RawSetIntSeqInt2ValueOmitjkj() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;

    log( "encoded value: ", encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))));

    f_compareAndVerdict(
      encode_rawSetIntSeqInt2(valueof(t_msetisi2_omitjkj(i,j,k))),
      encode_rawSetIntSeqInt2optopt({i:=10,jk:={15,omit}})  );
  }

  testcase tc_RawSetIntSeqInt2ValueRawjki() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_rawjki(i,j,k)));
    var octetstring vl_expected:= '0A000000'O & char2oct("ABBA") & '10000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqInt2ValueRawjkj() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_rawjkj(i,j,k)));
    var octetstring vl_expected:= '0A0000000F000000'O & char2oct("ABBA");
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  //After-before:
  testcase tc_RawSetIntSeqInt2AfteriBeforej() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_afteribeforej(i,j,k)));
    var octetstring vl_expected:= '0A00000041424241424142410F00000010000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqInt2AfteriRawBeforejRaw() runs on RawComp {
    var integer i:= 10, j:= 15, k:=16;
    var octetstring vl_encoded := encode_rawSetIntSeqInt2(valueof(t_msetisi2_afterirawbeforejraw(i,j,k)));
    var octetstring vl_expected:= '0A00000041424241424142410F00000010000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }
  //==== {integer, integer, integer, integer} ==============
  //omit
  testcase tc_RawSetInt4Omiti() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omiti(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(omit,2*i,3*i,4*i)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4Omitj() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitj(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,omit,3*i,4*i)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4Omitk() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitk(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,2*i,omit,4*i)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4Omitl() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_omitl(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetInt4opt(valueof(t_mseti4opt(i,2*i,3*i,omit)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4ValueiOctetStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valueiOctetStr(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetOJKL(valueof(t_msetojkl('FEDCBA98'O,2*i,3*i, 4*i)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4ValuejOctetStr() runs on RawComp {
    for(var integer i:=1; i<tsp_maxInt;i:=i*tsp_step) {
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuejOctetStr(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= encode_rawSetIOKL(valueof(t_msetiokl(i,'FEDCBA98'O,3*i, 4*i)));
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4ValueiRaw() runs on RawComp {
    var RoC vl_expectedValue:= {
      char2oct("ABBA") & '020000000300000004000000'O,
      char2oct("ABBA") & '140000001E00000028000000'O,
      char2oct("ABBA") & 'C80000002C01000090010000'O,
      char2oct("ABBA") & 'D0070000B80B0000A00F0000'O,
      char2oct("ABBA") & 'ECFFFFFFE2FFFFFFD8FFFFFF'O
    }

    var RoI vl_roi := { 1, 10, 100, 1000,-10};

    var integer i:=0;
    for(var integer index:=0; index<5;index:=index+1) {
      i:=vl_roi[index];
      log("i: ",i);
      var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valueiRaw(i,2*i,3*i,4*i)));
      var octetstring vl_expected:= vl_expectedValue[index];
      f_compareAndVerdict(vl_encoded, vl_expected);
    }
  }

  testcase tc_RawSetInt4ValuejRaw() runs on RawComp {
    var integer i:=1;
    var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuejRaw(i,2*i,3*i,4*i)));
    var octetstring vl_expected:= '01000000'O & char2oct("ABBA") & '0300000004000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetInt4ValuekRaw() runs on RawComp {
    var integer i:=1;
    var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuekRaw(i,2*i,3*i,4*i)));
    var octetstring vl_expected:= '0100000002000000'O & char2oct("ABBA") & '04000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetInt4ValuelRaw() runs on RawComp {
    var integer i:=1
    var octetstring vl_encoded := encode_rawSetInt4(valueof(t_mseti4_valuelRaw(i,2*i,3*i,4*i)));
    var octetstring vl_expected:= '010000000200000003000000'O & char2oct("ABBA");
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  //To test if a mandatory structure omitted
  template RawSetISKL t_msetiskl_valueSomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous(s)  "value:= omit" }

  template RawSetISKLopt t_msetisklopt(template integer p_i, template RawSeqInt4opt p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}

  testcase tc_RawSetISKL_ValueSomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    //var charstring vl_expectedValue:= "dumraw";
    var octetstring vl_encoded := encode_rawSetISKL   (valueof(t_msetiskl_valueSomit(10,vl_msi4,30,40)));
    var octetstring vl_expected:= encode_rawSetISKLopt(valueof(t_msetisklopt        (10,omit   ,30,40)));
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  template RawSetISKL t_msetiskl_valueSIomit(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous(s.i)  "value:= omit" }

  testcase tc_RawSetISKL_ValueSIomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_encoded := encode_rawSetISKL   (valueof(t_msetiskl_valueSIomit(10,vl_msi4     ,30,40)));
    var octetstring vl_expected:= encode_rawSetISKLopt(valueof(t_msetisklopt         (10,{6,7,8,omit},30,40)));
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetISKL_ValueSISJomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_encoded := encode_rawSetISKL(valueof(t_msetiskl_valueSISJomit(10,vl_msi4,30,40)));
    var octetstring vl_expected:= encode_rawSetIS2KLopt(valueof(t_msetis2klopt(10,{7,8},30,40)));
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  template RawSetISKL t_msetiskl_valueSraw(template integer p_i, template RawSeqInt4 p_s, template integer p_k,template integer p_l ) := {i:=p_i,  s:=p_s, k:=p_k, l:=p_l}
  with { erroneous (s)  "value(raw):= '41424241'O" }

  testcase tc_RawSetISKL_ValueSraw() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_encoded := encode_rawSetISKL(valueof(t_msetiskl_valueSraw(10,vl_msi4,30,40)));
    var octetstring vl_expected:= '0A000000'O & char2oct("ABBA") & '1E00000028000000'O;
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetISOKL_ValueSomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_encoded := encode_rawSetISOKL(valueof(t_msetisokl_valueSomit(10,vl_msi4,'42414241'O,30,40)));
    var octetstring vl_expected:= encode_rawSetISOKLopt(valueof(t_msetisoklopt(10,omit,'42414241'O,30,40)));
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIOSKL_ValueSomit() runs on RawComp {
    var RawSeqInt4 vl_msi4:={5,6,7,8};
    var octetstring vl_encoded := encode_rawSetIOSKL(valueof(t_msetioskl_valueSomit(10,'42414241'O,vl_msi4,30,40)));
    var octetstring vl_expected:= encode_rawSetIOSKLopt(valueof(t_msetiosklopt(10,'42414241'O,omit,30,40)));
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  //===== sequence of sequence of sequence ====
  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omiti() runs on RawComp {
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omiti(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetSeqIntSeqInt2SeqCharstring2({jkl:={2,{3,4}},xy:={"Albert","Einstein"}});
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitjkl() runs on RawComp {
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omitjkl(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetIntSeqCharstring2({i:= 1, xy:={"Albert","Einstein"}});
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitxy() runs on RawComp {
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_omitxy(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2({ i:=1, jkl:={2,{3,4}} });
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  //...with { erroneous(jkl.jk.j) "value:=omit"}
  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_omitjkll() runs on RawComp {
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(
        valueof(t_msetisisi2r2_omitjkll(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2optoptSeqCharstring2({i:=1,jkl:={2,{3,omit}},xy:= {"Albert","Einstein"}});
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_valuexy() runs on RawComp {
    //var RawSetIntSeqIntSeqInt2SeqCharstring2 vl_msisisi2r2;
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(valueof(t_msetisisi2r2_valuexy(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2SeqCharstring2({i:=1,jkl:={2,{3,4}}, xy:={"Albert","Einstein"}})
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSetIntSeqIntSeqInt2SeqCharstring2_valuex_y() runs on RawComp {
    var octetstring vl_encoded := encode_rawSetIntSeqIntSeqInt2SeqCharstring2(
        valueof(t_msetisisi2r2_valuex_y(1, {2,{3,4}}, {"Albert","Einstein"} )));
    var octetstring vl_expected:= encode_rawSetIntSeqIntSeqInt2SeqCharstring2({i:=1,jkl:={2,{3,4}},xy:= {"Albert","Einstein"}});
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

  testcase tc_RawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit() runs on RawComp {
    var RawSeqSeqIntSeqInt2SeqCharstring2 vl_s1:={jkl:={1,{2,3}},xy:={"Three","Four"} }, vl_s2:= {jkl:={5,{6,7}},xy:={"Seven", "Eight"}};
    var RawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2 vl_etalon :=
    { s1:={ omit,{1,{2, omit}}, {"Three","Four"} },s2:= { omit,{5,{6,7}}, {"Seven", "Eight"}} };

    var octetstring vl_encoded := encode_rawSet_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2(valueof(t_msetssi2sr2ssi2sr2_omit(vl_s1, vl_s2)));
    var octetstring vl_expected:= encode_rawSet_SeqSeqIntSeqInt2optoptSeqCharstring2_SeqSeqIntSeqInt2optoptSeqCharstring2(vl_etalon);
    f_compareAndVerdict(vl_encoded, vl_expected);
  }

}//group Set


group SetOf {  //====set of related templates====

  template RawSetOfBool  t_msetofb(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 };
  template RawSetOfInt   t_msetofi(template integer p_i1, template integer p_i2, template integer p_i3):={p_i1,p_i2,p_i3};
  template RawSetOfRawEnum t_msetofme(template RawEnum p_e1, template RawEnum p_e2,template RawEnum p_e3) := {p_e1,p_e2,p_e3};
  template RawSetOfCharstring  t_msetofr(template  charstring p_f1, template charstring p_f2, template charstring p_f3, template charstring p_f4):= {p_f1, p_f2,p_f3,p_f4}
  template RawSetOfBitStr t_msetofbs(template bitstring p_bs1, template bitstring p_bs2, template bitstring p_bs3):={p_bs1, p_bs2, p_bs3}
  template RawSetOfOctStr t_msetofos(template octetstring p_os1, template octetstring p_os2, template octetstring p_os3):={p_os1, p_os2, p_os3}

  template RawSetOfBool  t_msetofbValueSameType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:= boolean:true"; erroneous ([2]) "value:= boolean:true" };

  template RawSetOfBool  t_msetofbValueDiffType(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= int32 : 2011" };

  template RawSetOfBool  t_msetofbValueOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "value:=omit"; erroneous ([1]) "value:= omit" };

  template RawSetOfBool  t_msetofbAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "after:=omit all" };

  template RawSetOfBool  t_msetofbValueAfterOmit(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([0]) "after:=omit all"; erroneous ([0]) "value:=true" };

  template RawSetOfBool  t_msetofbBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([2]) "before:=omit all" };

  template RawSetOfBool  t_msetofbValueBeforeOmit2(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([2]) "before:=omit all"; erroneous ([2]) "value:=true" };

  template RawSetOfBool  t_msetofbBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([1]) "before:=omit all" };

  template RawSetOfBool  t_msetofbValueBeforeOmit1(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with {  erroneous ([1]) "before:=omit all"; erroneous ([1]) "value:=true" };

  //INTEGER
  template RawSetOfInt  t_msetofiBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };
  template RawSetOfInt  t_msetofiCharStrValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
  template RawSetOfInt  t_msetofiBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };
  template RawSetOfInt  t_msetofiCharStrValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfInt  t_msetofiCharStrValueBeforeOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  template RawSetOfInt  t_msetofiAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };
  template RawSetOfInt  t_msetofiCharStrValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfInt  t_msetofiCharStrValueAfterOmit1_2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //RawEnum
  template RawSetOfRawEnum  t_msetofeValueDiffType(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
  template RawSetOfRawEnum  t_msetofeBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };
  template RawSetOfRawEnum  t_msetofeIntValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
  template RawSetOfRawEnum  t_msetofeCharStrValueBeforeOmit2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
  template RawSetOfRawEnum  t_msetofeBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };
  template RawSetOfRawEnum  t_msetofeIntValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSetOfRawEnum  t_msetofeCharStrValueBeforeOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfRawEnum  t_msetofeCharStrValueBeforeOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  template RawSetOfRawEnum  t_msetofeAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };
  template RawSetOfRawEnum  t_msetofeIntValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSetOfRawEnum  t_msetofeCharStrValueAfterOmit1(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfRawEnum  t_msetofeCharStrValueAfterOmit1_2(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //Charstring (charstring):
  template RawSetOfCharstring  t_msetofrValueDiffType(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };
  template RawSetOfCharstring  t_msetofrValueDiffTypeRaw(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };
  template RawSetOfCharstring  t_msetofrBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all" };
  template RawSetOfCharstring  t_msetofrIntValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};
  template RawSetOfCharstring  t_msetofrCharStrValueBeforeOmit2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};
  template RawSetOfCharstring  t_msetofrBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all" };
  template RawSetOfCharstring  t_msetofrIntValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSetOfCharstring  t_msetofrCharStrValueBeforeOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfCharstring  t_msetofrCharStrValueBeforeOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([2]) "value:= ""bubu"""};

  template RawSetOfCharstring  t_msetofrAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all" };
  template RawSetOfCharstring  t_msetofrIntValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};
  template RawSetOfCharstring  t_msetofrCharStrValueAfterOmit1(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= ""bubu"""};
  template RawSetOfCharstring  t_msetofrCharStrValueAfterOmit1_2(charstring p_i, charstring p_j, charstring p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([0]) "value:= ""bubu"""};
  //more complex:
  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_omitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "value:=omit" }

  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeomitj(template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "before:=omit all"  erroneous([1].jkl.jk.i) "after:=omit all"}

  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_beforeafteromit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j) "before:=omit all"  erroneous([1].jkl.jk.i) "after:=omit all"}

  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_omit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.i, [0].jkl.jk.j, [0].xy.x) "value:=omit"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}

  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_afteromit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.i, [0].xy.x) "after:=omit all"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}

  template RawSetOfSeqSeqIntSeqInt2SeqCharstring2 t_msetofssisi2sr2_arglist_beforeomit(
      template RawSeqSeqIntSeqInt2SeqCharstring2 p_s1,template RawSeqSeqIntSeqInt2SeqCharstring2 p_s2) :={ p_s1, p_s2}
  with { erroneous([0].jkl.jk.j, [0].xy.y) "before:=omit all"  erroneous([1].jkl.jk.i, [1].xy.x) "after:=omit all"}
  //============ Testcases====================
  //Testcase of same type
  testcase tc_RawSetOfBoolValueSameType1() runs on RawComp {
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueSameType(false, false,false))),
      encode_rawSetOfBool(valueof(t_msetofb(true, false, true))));
  }

  testcase tc_RawSetOfBoolValueSameType2() runs on RawComp {
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueSameType(true, true,true))),
      encode_rawSetOfBool(valueof(t_msetofb(true, true, true))));
  }

  template RawSetOfBool t_msetofbValueDiffTypeRaw(template boolean p_b1, template boolean p_b2, template boolean p_b3) := { p_b1, p_b2, p_b3 }
  with { erroneous ([0]) "value(raw) := '02010A'O" erroneous ([2]) "value := int32 : 2011" };

  testcase tc_RawSetOfBoolValueDiffType() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {b:=true}, {i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueDiffType(true, true,true))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSetOfBoolValueRaw() runs on RawComp {
    var octetstring actual  := encode_rawSetOfBool(valueof(t_msetofbValueDiffTypeRaw(true, true, true)));
    var RawSetOfBoolBogus vl_expected := { true, 2011 };
    var octetstring expected:= '02010A'O & encode_rawSetOfBoolBogus(vl_expected);
    f_compareAndVerdict(actual, expected);
  }

  testcase tc_RawSetOfBoolValueOmit() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueOmit(false, false,true))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolAfterOmit() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=false} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbAfterOmit(false, true,true))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolValueAfterOmit() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueAfterOmit(false, false,false))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbBeforeOmit2(false, false,true))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=true} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueBeforeOmit2(false, false,false))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=false},{b:=true}  };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbBeforeOmit1(true, false,true))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfBoolValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {b:=true},{b:=false} };
    f_compareAndVerdict(
      encode_rawSetOfBool(valueof(t_msetofbValueBeforeOmit1(false, false,false))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  //INTEGER
  template RawSetOfInt32  t_msetofiValueDiffType(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value:= ""Pi"""; erroneous ([2]) "value:= true" };

  testcase tc_RawSetOfIntValueDiffType() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {r:="Pi"}, {i:=2}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSetOfInt32(valueof(t_msetofiValueDiffType(1,2,3))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }

  template RawSetOfInt32  t_msetofiValueDiffTypeRaw(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };

  testcase tc_RawSetOfIntValueDiffTypeRaw() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {r:="\x01\x01\xFF"}, {i:=2}, {b:=true}}; // oct2char('0101FF'O)
    f_compareAndVerdict(
      encode_rawSetOfInt32(valueof(t_msetofiValueDiffTypeRaw(1,2,3))),
      '0101FF0200000001'O);
    f_compareAndVerdict(
      encode_rawSetOfInt32(valueof(t_msetofiValueDiffTypeRaw(1,2,3))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfIntBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {i:=3} };
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiBeforeOmit2(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  template RawSetOfInt  t_msetofiIntValueBeforeOmit2(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([2]) "before:= omit all"; erroneous ([2]) "value:= int32 : 2011"};

  testcase tc_RawSetOfIntIntValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiIntValueBeforeOmit2(1,2,3))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfIntCharStrValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit2(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfIntBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {i:=2},{i:=3} };
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiBeforeOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  template RawSetOfInt32  t_msetofiIntValueBeforeOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "before:= omit all"; erroneous ([1]) "value:= int32 : 2011"};

  testcase tc_RawSetOfIntIntValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {i:=3}};
    f_compareAndVerdict(
      encode_rawSetOfInt32(valueof(t_msetofiIntValueBeforeOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfIntCharStrValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=3}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfIntCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {i:=2},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiCharStrValueBeforeOmit1_2(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfIntAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={  {i:=1}, {i:=2} } ;
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiAfterOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  template RawSetOfInt32  t_msetofiIntValueAfterOmit1(integer p_i, integer p_j, integer p_k) := { p_i, p_j, p_k }
  with {  erroneous ([1]) "after:= omit all"; erroneous ([1]) "value:= int32 : 2011"};

  testcase tc_RawSetOfIntIntValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=1},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfInt32(valueof(t_msetofiIntValueAfterOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }

  testcase tc_RawSetOfIntCharStrValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {i:=1},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiCharStrValueAfterOmit1(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfIntCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{i:=2}};
    f_compareAndVerdict(
      encode_rawSetOfInt(valueof(t_msetofiCharStrValueAfterOmit1_2(1,2,3))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  //RawEnum
  testcase tc_RawSetOfRawEnumValueDiffType() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="Pi"}, {e:=second}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeValueDiffType(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  template RawSetOfRawEnum  t_msetofeValueDiffTypeRaw(RawEnum p_i, RawEnum p_j, RawEnum p_k) := { p_i, p_j, p_k }
  with {  erroneous ([0]) "value(raw):= '0101FF'O"; erroneous ([2]) "value:= true" };

  testcase tc_RawSetOfRawEnumValueDiffTypeRaw() runs on RawComp {
    var octetstring actual := encode_rawSetOfRawEnum(valueof(t_msetofeValueDiffTypeRaw(first, second, third)));
    f_compareAndVerdict(
      actual,
      '0101FF'O // first raw value
      & '06'O); // bottom 2 bits: '10'B for second, 3rd bit is '1'B for true, top 5 bits are '00000'B (filler zeros)
      //'06'O = bit2oct('00000'B & '1'B & '10'B)
    var RawSetOfRawUnionBT vl_expected :={ {os:='0101FF'O}, {e:=second}, {b:=true}};
    var octetstring expected := encode_rawSetOfRawUnionBT(vl_expected);
    f_compareAndVerdict(actual, expected);
  }
  testcase tc_RawSetOfRawEnumBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {e:=third} };
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeBeforeOmit2(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumIntValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeIntValueBeforeOmit2(first, second, third))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit2(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {e:=second},{e:=third} };
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeBeforeOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumIntValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {e:=third}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeIntValueBeforeOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=third}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {e:=second},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueBeforeOmit1_2(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfRawEnumAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={  {e:=first}, {e:=second} } ;
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeAfterOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumIntValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {e:=first},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeIntValueAfterOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumCharStrValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {e:=first},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueAfterOmit1(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfRawEnumCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{e:=second}};
    f_compareAndVerdict(
      encode_rawSetOfRawEnum(valueof(t_msetofeCharStrValueAfterOmit1_2(first, second, third))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  //Charstring (Charstring)
  testcase tc_RawSetOfCharstringValueDiffType() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="Pi"}, {r:="Two"}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrValueDiffType("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringValueDiffTypeRaw() runs on RawComp {
    //var RawSetOfRawUnionBT vl_expected :={ {b:=true}, {r:="Two"}, {b:=true}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrValueDiffTypeRaw("One", "Two", "Three"))),
      '0101FF'O & char2oct("Two") & '01'O
      ); //'0101FF'O
    //encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="Three"} };
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrBeforeOmit2("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringIntValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrIntValueBeforeOmit2("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfCharstringCharStrValueBeforeOmit2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit2("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="Two"},{r:="Three"} };
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrBeforeOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringIntValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {i:=2011}, {r:="Three"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrIntValueBeforeOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfCharstringCharStrValueBeforeOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Three"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringCharStrValueBeforeOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="Two"},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueBeforeOmit1_2("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

  testcase tc_RawSetOfCharstringAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={  {r:="One"}, {r:="Two"} } ;
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrAfterOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringIntValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT32 vl_expected :={ {r:="One"},{i:=2011}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrIntValueAfterOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT32( vl_expected ));
  }
  testcase tc_RawSetOfCharstringCharStrValueAfterOmit1() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="One"},{r:="bubu"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }
  testcase tc_RawSetOfCharstringCharStrValueAfterOmit1_2() runs on RawComp {
    var RawSetOfRawUnionBT vl_expected :={ {r:="bubu"},{r:="Two"}};
    f_compareAndVerdict(
      encode_rawSetOfCharstring(valueof(t_msetofrCharStrValueAfterOmit1_2("One", "Two", "Three"))),
      encode_rawSetOfRawUnionBT( vl_expected ));
  }

} //SetOf

group Union {

  template RawUnionBasicTypesT t_mubt_boolean3( template boolean p_b) := { b:= p_b }
  with { erroneous(b) "value:=false" }  //encoded into ''O

  testcase tc_rawUnionBasicTypes_boolean3() runs on RawComp {
    //0. just for fun:
    var RawUnionBasicTypesT vl_mubt:={b:=true};
    f_compareAndVerdict(encode_rawUnionBasicTypesT(vl_mubt), '01'O);
    //1.
    vl_mubt:={b:=false};
    f_compareAndVerdict(
      encode_rawUnionBasicTypesT(valueof(t_mubt_boolean3(true))),
      encode_rawUnionBasicTypesT( vl_mubt ) );
  }

  template RawUnionBasicTypesT t_mubt_booleanRaw( template boolean p_b) := { b:= p_b }
  with { erroneous(b) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_booleanRaw() runs on RawComp {
    f_compareAndVerdict( encode_rawUnionBasicTypesT(valueof(t_mubt_booleanRaw(true))), char2oct("ABBA"))
  }//tc_

  template RawUnionBasicTypesT t_mubt_integerRaw( template integer p_i) := { i:= p_i }
  with { erroneous(i) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_integerRaw() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_integerRaw(129))),char2oct("ABBA"))
  }//tc_

  template RawUnionBasicTypesT t_mubt_enumRaw( template RawEnum p_e) := { e:= p_e }
  with { erroneous(e) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_enumRaw() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_enumRaw(second))), char2oct("ABBA") )
  }//tc_

  template RawUnionBasicTypesT t_mubt_stringRaw( template charstring p_r) := { r:= p_r }
  with { erroneous(r) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_stringRaw() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_stringRaw("Three"))), char2oct("ABBA") )
  }//tc_

  template RawUnionBasicTypesT t_mubt_bitstrRaw( template bitstring p_bs) := { bs:= p_bs }
  with { erroneous(bs) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_bitstrRaw() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_bitstrRaw('101011111'B))), char2oct("ABBA") )
  }//tc_

  template RawUnionBasicTypesT t_mubt_octetstrRaw( template octetstring p_os) := { os:= p_os }
  with { erroneous(os) "value(raw):='41424241'O" }

  testcase tc_rawUnionBasicTypes_octetstrRaw() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionBasicTypesT(valueof(t_mubt_octetstrRaw('BABAB0B0'O))), char2oct("ABBA") )
  }//tc_

  template RawUnionComplexTypes t_muct_0_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[0], sofcharstring[1]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_0_1() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_1( "One","Two","Three" ) )), char2oct("Three") );
  }//tc_

  template RawUnionComplexTypes t_muct_0_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[0], sofcharstring[2]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_0_2() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_2( "One","Two","Three" ) )), char2oct("Two") );
  }//tc_

  template RawUnionComplexTypes t_muct_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[1], sofcharstring[2]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_1_2() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_1_2( "One","Two","Three" ) )), char2oct("One") );
  }//tc_

  template RawUnionComplexTypes t_muct_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[2], sofcharstring[1]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_2_1() runs on RawComp {
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_2_1( "One","Two","Three" ) )), char2oct("One") );
  }//tc_

  template RawUnionComplexTypes t_muct_0_1_2( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[0], sofcharstring[1], sofcharstring[2]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_0_1_2() runs on RawComp {
    //var RawSeqOfCharstring vl_expected:= { }
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_1_2 ( "Ten","One","Two" ) )),  char2oct("") );
  }//tc_

  template RawUnionComplexTypes t_muct_0_2_1( template charstring p_f1, template charstring p_f2, template charstring p_f3)
  := { sofcharstring:={p_f1,p_f2,p_f3} }
  with { erroneous(sofcharstring[0], sofcharstring[2], sofcharstring[1]) "value :=omit" }

  testcase tc_rawUnionComplexTypes_omit_0_2_1() runs on RawComp {
    //var RawSeqOfCharstring vl_expected:= { }
    f_compareAndVerdict(encode_rawUnionComplexTypes(valueof(t_muct_0_2_1 ( "One","Two","Three" ) )), char2oct("") );
  }//tc_

}//group Union


control {
  //SEQUENCE:
  execute(tc_rawSeqIntOmit());
  execute(tc_rawSeqIntValueSameTypeE());
  execute(tc_rawSeqIntValueSameTypeI());
  execute(tc_rawSeqIntValueDiffTypeExplicitBool());
  execute(tc_rawSeqIntValueDiffTypeImplicitBool());
  execute(tc_rawSeqIntValueDiffTypeExplicitOctStr());
  execute(tc_rawSeqIntValueDiffTypeImplicitOctStr());
  execute(tc_rawSeqIntValueDiffTypeExplicitEnum());
  execute(tc_rawSeqIntValueDiffTypeExplicitCharstring());
  execute(tc_rawSeqIntValueDiffTypeImplicitCharstring());
  execute(tc_rawSeqIntValueDiffTypeExplicitStr());
  execute(tc_rawSeqIntValueDiffTypeRawOctStr());
  execute(tc_rawSeqInt2Omiti());
  execute(tc_rawSeqInt2Omitj());
  execute(tc_rawSeqInt2BeforeOmitj());
  execute(tc_rawSeqInt2AfterOmiti());
  execute(tc_rawSeqInt2ValueSameTypeE());
  execute(tc_rawSeqInt2ValueSameTypeI());
  execute(tc_rawSeqInt2ValueDiffTypeExplicitCharstring());
  execute(tc_rawSeqInt2ValueDiffTypeImplicitCharstring());
  execute(tc_rawSeqInt2ValueDiffTypeExplicitStr());
  execute(tc_rawSeqInt2ValueSeqIntV());
  execute(tc_rawSeqInt2ValueSeqIntOptV());
  execute(tc_rawSeqInt2ValueSeqIntC());
  execute(tc_rawSeqInt2ValueSeqInt2OptC());
  execute(tc_rawSeqInt2ValueSeqInt2OptOmitC());
  execute(tc_rawSeqInt2ValueSeqInt2iiC());
  execute(tc_rawSeqInt2ValueSeqInt2ijC());
  execute(tc_rawSeqInt2ValueSeqInt2jiC());
  execute(tc_rawSeqInt2ValueSeqInt2jjC());
  execute(tc_rawSeqIntSeqInt2ValueOmiti());
  execute(tc_rawSeqIntSeqInt2ValueOmitjki());
  execute(tc_rawSeqIntSeqInt2ValueOmitjkj());
  execute(tc_rawSeqIntSeqInt2ValueRawjki());
  execute(tc_rawSeqIntSeqInt2ValueRawjkj());
  execute(tc_rawSeqIntSeqInt2AfteriBeforej());
  execute(tc_rawSeqIntSeqInt2AfteriRawBeforejRaw());
  execute(tc_rawSeqInt4Omiti());
  execute(tc_rawSeqInt4Omitj());
  execute(tc_rawSeqInt4Omitk());
  execute(tc_rawSeqInt4Omitl());
  execute(tc_rawSeqInt4ValueiOctetStr());
  execute(tc_rawSeqInt4ValuejOctetStr());
  execute(tc_rawSeqInt4ValueiRaw());
  execute(tc_rawSeqInt4ValuejRaw());
  execute(tc_rawSeqInt4ValuekRaw());
  execute(tc_rawSeqInt4ValuelRaw());
  execute(tc_rawSeqISKL_ValueSomit());
  execute(tc_rawSeqISKL_ValueSIomit());
  execute(tc_rawSeqISKL_ValueSISJomit());
  execute(tc_rawSeqISKL_ValueSraw());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omiti());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkl());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitxy());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_omitjkll());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuexy());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr1());
  execute(tc_RawSeqIntSeqIntSeqInt2SeqCharstring2_valuex_y_expr2());
  execute(tc_RawSeq_SeqSeqIntSeqInt2SeqCharstring2_SeqSeqIntSeqInt2SeqCharstring2_omit());

  execute(tc_RawSeqInt2opt_before_raw());
  execute(tc_RawSeqInt2opt_value_raw());
  execute(tc_RawSeqInt2opt_after_raw());

  execute(tc_RawSeqInt2opt_before());
  execute(tc_RawSeqInt2opt_value());
  execute(tc_RawSeqInt2opt_after());

  //========= SEQUENCE OF=====================
  //Bool:
  execute(tc_RawSeqOfBoolValueSameType1());
  execute(tc_RawSeqOfBoolValueSameType2());
  execute(tc_RawSeqOfBoolValueDiffType());
  execute(tc_RawSeqOfBoolValueRaw());
  execute(tc_RawSeqOfBoolValueOmit());
  execute(tc_RawSeqOfBoolAfterOmit());
  execute(tc_RawSeqOfBoolValueAfterOmit());
  execute(tc_RawSeqOfBoolBeforeOmit2());
  execute(tc_RawSeqOfBoolValueBeforeOmit2());
  execute(tc_RawSeqOfBoolBeforeOmit1());
  execute(tc_RawSeqOfBoolValueBeforeOmit1());
  //INTEGER:
  execute(tc_RawSeqOfIntValueDiffType());
  execute(tc_RawSeqOfIntValueDiffTypeRaw());
  execute(tc_RawSeqOfIntBeforeOmit2());
  execute(tc_RawSeqOfIntIntValueBeforeOmit2());
  execute(tc_RawSeqOfIntCharStrValueBeforeOmit2());
  execute(tc_RawSeqOfIntBeforeOmit1());
  execute(tc_RawSeqOfIntIntValueBeforeOmit1());
  execute(tc_RawSeqOfIntCharStrValueBeforeOmit1() );
  execute(tc_RawSeqOfIntCharStrValueBeforeOmit1_2());
  execute(tc_RawSeqOfIntAfterOmit1());
  execute(tc_RawSeqOfIntIntValueAfterOmit1());
  execute(tc_RawSeqOfIntCharStrValueAfterOmit1() );
  execute(tc_RawSeqOfIntCharStrValueAfterOmit1_2());
  //RawEnum
  execute(tc_RawSeqOfRawEnumValueDiffType());
  execute(tc_RawSeqOfRawEnumValueDiffTypeRaw());
  execute(tc_RawSeqOfRawEnumBeforeOmit2());
  execute(tc_RawSeqOfRawEnumIntValueBeforeOmit2());
  execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit2());
  execute(tc_RawSeqOfRawEnumBeforeOmit1());
  execute(tc_RawSeqOfRawEnumIntValueBeforeOmit1());
  execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit1() );
  execute(tc_RawSeqOfRawEnumCharStrValueBeforeOmit1_2());
  execute(tc_RawSeqOfRawEnumAfterOmit1());
  execute(tc_RawSeqOfRawEnumIntValueAfterOmit1());
  execute(tc_RawSeqOfRawEnumCharStrValueAfterOmit1() );
  execute(tc_RawSeqOfRawEnumCharStrValueAfterOmit1_2());
  //REAL (charstring)
  execute(tc_RawSeqOfCharstringValueDiffType());
  execute(tc_RawSeqOfCharstringValueDiffTypeRaw());
  execute(tc_RawSeqOfCharstringBeforeOmit2());
  execute(tc_RawSeqOfCharstringIntValueBeforeOmit2());
  execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit2());
  execute(tc_RawSeqOfCharstringBeforeOmit1());
  execute(tc_RawSeqOfCharstringIntValueBeforeOmit1());
  execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit1() );
  execute(tc_RawSeqOfCharstringCharStrValueBeforeOmit1_2());
  execute(tc_RawSeqOfCharstringAfterOmit1());
  execute(tc_RawSeqOfCharstringIntValueAfterOmit1());
  execute(tc_RawSeqOfCharstringCharStrValueAfterOmit1() );
  execute(tc_RawSeqOfCharstringCharStrValueAfterOmit1_2());
  //Depth 3-4:
  execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_omitj());
  execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_beforeafteromit());
  execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_omit());
  execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_afteromit());
  execute(tc_RawSeqOf_SeqSeqIntSeqInt2SeqCharstring2_arglist_beforeomit());
  //========= SET ============================
  execute(tc_RawSetIntOmit()); // <========{ integer }
  execute(tc_RawSetIntValueSameTypeE());
  execute(tc_RawSetIntValueSameTypeI());
  execute(tc_RawSetIntValueDiffTypeExplicitBool());
  execute(tc_RawSetIntValueDiffTypeImplicitBool());
  execute(tc_RawSetIntValueDiffTypeExplicitOctStr());
  execute(tc_RawSetIntValueDiffTypeImplicitOctStr());
  execute(tc_RawSetIntValueDiffTypeExplicitOctStr_const());
  execute(tc_RawSetIntValueDiffTypeExplicitEnum());
  execute(tc_RawSetIntValueDiffTypeExplicitCharstring());
  execute(tc_RawSetIntValueDiffTypeImplicitCharstring());
  execute(tc_RawSetIntValueDiffTypeRawOctStr());
  execute(tc_RawSetInt2Omiti());//<===== {integer, integer}
  execute(tc_RawSetInt2Omitj());
  execute(tc_RawSetInt2BeforeOmitj());
  execute(tc_RawSetInt2AfterOmiti());
  execute(tc_RawSetInt2ValueSameTypeE());
  execute(tc_RawSetInt2ValueSameTypeI());
  execute(tc_RawSetInt2ValueDiffTypeExplicitCharstring());
  execute(tc_RawSetInt2ValueDiffTypeImplicitCharstring());
  execute(tc_RawSetInt2ValueSeqIntV());
  execute(tc_RawSetInt2ValueSeqIntOptV());
  execute(tc_RawSetInt2ValueSeqIntC());
  execute(tc_RawSetInt2ValueSeqInt2OptC());
  execute(tc_RawSetInt2ValueSeqInt2OptOmitC());
  execute(tc_RawSetInt2ValueSeqInt2iiC());
  execute(tc_RawSetInt2ValueSeqInt2ijC());
  execute(tc_RawSetInt2ValueSeqInt2jiC());
  execute(tc_RawSetInt2ValueSeqInt2jjC());
  execute(tc_RawSetIntSeqInt2ValueOmiti());
  //=== Set { integer, {integer, integer} )
  execute(tc_RawSetIntSeqInt2ValueOmitjki());
  execute(tc_RawSetIntSeqInt2ValueOmitjkj());
  execute(tc_RawSetIntSeqInt2ValueRawjki());
  execute(tc_RawSetIntSeqInt2ValueRawjkj());
  execute(tc_RawSetIntSeqInt2AfteriBeforej());
  execute(tc_RawSetIntSeqInt2AfteriRawBeforejRaw());
  //<===== {integer, integer,integer, integer}
  execute(tc_RawSetInt4Omiti());
  execute(tc_RawSetInt4Omitj());
  execute(tc_RawSetInt4Omitk());
  execute(tc_RawSetInt4Omitl());
  execute(tc_RawSetInt4ValueiOctetStr());
  execute(tc_RawSetInt4ValuejOctetStr());
  execute(tc_RawSetInt4ValueiRaw());
  execute(tc_RawSetInt4ValuejRaw());
  execute(tc_RawSetInt4ValuekRaw());
  execute(tc_RawSetInt4ValuelRaw());
  execute(tc_RawSetISKL_ValueSomit());
  execute(tc_RawSetISKL_ValueSIomit());
  execute(tc_RawSetISKL_ValueSISJomit());
  execute(tc_RawSetISKL_ValueSraw());
  execute(tc_RawSetISOKL_ValueSomit()); //pass
  execute(tc_RawSetIOSKL_ValueSomit());

  //========= SET OF =========================
  //Bool:
  execute(tc_RawSetOfBoolValueSameType1());
  execute(tc_RawSetOfBoolValueSameType2());
  execute(tc_RawSetOfBoolValueDiffType());
  execute(tc_RawSetOfBoolValueRaw());
  execute(tc_RawSetOfBoolValueOmit());
  execute(tc_RawSetOfBoolAfterOmit());
  execute(tc_RawSetOfBoolValueAfterOmit());
  execute(tc_RawSetOfBoolBeforeOmit2());
  execute(tc_RawSetOfBoolValueBeforeOmit2());
  execute(tc_RawSetOfBoolBeforeOmit1());
  execute(tc_RawSetOfBoolValueBeforeOmit1());
  //INTEGER:
  execute(tc_RawSetOfIntValueDiffType());
  execute(tc_RawSetOfIntValueDiffTypeRaw());
  execute(tc_RawSetOfIntBeforeOmit2());
  execute(tc_RawSetOfIntIntValueBeforeOmit2());
  execute(tc_RawSetOfIntCharStrValueBeforeOmit2());
  execute(tc_RawSetOfIntBeforeOmit1());
  execute(tc_RawSetOfIntIntValueBeforeOmit1());
  execute(tc_RawSetOfIntCharStrValueBeforeOmit1() );
  execute(tc_RawSetOfIntCharStrValueBeforeOmit1_2());
  execute(tc_RawSetOfIntAfterOmit1());
  execute(tc_RawSetOfIntIntValueAfterOmit1());
  execute(tc_RawSetOfIntCharStrValueAfterOmit1() );
  execute(tc_RawSetOfIntCharStrValueAfterOmit1_2());
  //RawEnum
  execute(tc_RawSetOfRawEnumValueDiffType());
  execute(tc_RawSetOfRawEnumValueDiffTypeRaw());
  execute(tc_RawSetOfRawEnumBeforeOmit2());
  execute(tc_RawSetOfRawEnumIntValueBeforeOmit2());
  execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit2());
  execute(tc_RawSetOfRawEnumBeforeOmit1());
  execute(tc_RawSetOfRawEnumIntValueBeforeOmit1());
  execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit1() );
  execute(tc_RawSetOfRawEnumCharStrValueBeforeOmit1_2());
  execute(tc_RawSetOfRawEnumAfterOmit1());
  execute(tc_RawSetOfRawEnumIntValueAfterOmit1());
  execute(tc_RawSetOfRawEnumCharStrValueAfterOmit1() );
  execute(tc_RawSetOfRawEnumCharStrValueAfterOmit1_2());
  //REAL (charstring)
  execute(tc_RawSetOfCharstringValueDiffType());
  execute(tc_RawSetOfCharstringValueDiffTypeRaw());
  execute(tc_RawSetOfCharstringBeforeOmit2());
  execute(tc_RawSetOfCharstringIntValueBeforeOmit2());
  execute(tc_RawSetOfCharstringCharStrValueBeforeOmit2());
  execute(tc_RawSetOfCharstringBeforeOmit1());
  execute(tc_RawSetOfCharstringIntValueBeforeOmit1());
  execute(tc_RawSetOfCharstringCharStrValueBeforeOmit1() );
  execute(tc_RawSetOfCharstringCharStrValueBeforeOmit1_2());
  execute(tc_RawSetOfCharstringAfterOmit1());
  execute(tc_RawSetOfCharstringIntValueAfterOmit1());
  execute(tc_RawSetOfCharstringCharStrValueAfterOmit1() );
  execute(tc_RawSetOfCharstringCharStrValueAfterOmit1_2());

  //========= UNION ==========================
  execute(tc_rawUnionBasicTypes_boolean3());
  execute(tc_rawUnionBasicTypes_booleanRaw());
  execute(tc_rawUnionBasicTypes_integerRaw());
  execute(tc_rawUnionBasicTypes_enumRaw());
  execute(tc_rawUnionBasicTypes_stringRaw());
  execute(tc_rawUnionBasicTypes_octetstrRaw());
  execute(tc_rawUnionComplexTypes_omit_0_1());
  execute(tc_rawUnionComplexTypes_omit_0_2());
  execute(tc_rawUnionComplexTypes_omit_1_2());
  execute(tc_rawUnionComplexTypes_omit_2_1());
  execute(tc_rawUnionComplexTypes_omit_0_1_2());
  execute(tc_rawUnionComplexTypes_omit_0_2_1());
}

}
