
-- 1: -- CXA4030.A
-- 2: --
-- 3: --                             Grant of Unlimited Rights
-- 4: --
-- 5: --     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- 6: --     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- 7: --     unlimited rights in the software and documentation contained herein.
-- 8: --     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making
-- 9: --     this public release, the Government intends to confer upon all
-- 10: --     recipients unlimited rights  equal to those held by the Government.
-- 11: --     These rights include rights to use, duplicate, release or disclose the
-- 12: --     released technical data and computer software in whole or in part, in
-- 13: --     any manner and for any purpose whatsoever, and to have or permit others
-- 14: --     to do so.
-- 15: --
-- 16: --                                    DISCLAIMER
-- 17: --
-- 18: --     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- 19: --     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- 20: --     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- 21: --     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- 22: --     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- 23: --     PARTICULAR PURPOSE OF SAID MATERIAL.
-- 24: --*
-- 25: --
-- 26: -- OBJECTIVE:
-- 27: --      Check that Ada.Strings.Unbounded versions of subprograms Translate
-- 28: --      (procedure and function), Index, and Count, which use a
-- 29: --      Maps.Character_Mapping_Function input parameter, produce correct
-- 30: --      results.
-- 31: --
-- 32: -- TEST DESCRIPTION:
-- 33: --      This test examines the operation of the four subprograms contained
-- 34: --      in the Ada.Strings.Unbounded package that use a
-- 35: --      Character_Mapping_Function parameter to provide the mapping
-- 36: --      capability.
-- 37: --      Two Character_Mapping_Function objects are defined that reference
-- 38: --      subprograms contained in the Ada.Characters.Handling package;
-- 39: --      To_Lower will return the lower-case form of the character provided
-- 40: --      as the input parameter, To_Upper will return the upper-case form
-- 41: --      of the character input parameter (provided there is an upper-case
-- 42: --      form).
-- 43: --      In several instances in this test, the character handling functions
-- 44: --      are referenced directly in the parameter list of the subprograms
-- 45: --      under test, demonstrating another form of expected common usage.
-- 46: --
-- 47: --      Results of all subprograms are compared with expected results.
-- 48: --
-- 49: --      This test, when taken in conjunction with tests CXA4010, CXA4011,
-- 50: --      CXA4031, and CXA4032 will constitute a test of all the functionality
-- 51: --      contained in package Ada.Strings.Unbounded.  This test uses a variety
-- 52: --      of the subprograms defined in the unbounded string package in ways
-- 53: --      typical of common usage.
-- 54: --
-- 55: --
-- 56: -- CHANGE HISTORY:
-- 57: --      21 Feb 95   SAIC    Initial prerelease version
-- 58: --      21 Apr 95   SAIC    Modified header commentary.
-- 59: --
-- 60: --!

-- 61:

-- 62: with Jwa.Strings;

-- 63: with Ada.Strings.Maps;

-- 64: with Ada.Characters.Handling;

-- 65: with Ada.Characters.Latin_1;
with ada;

-- 66: with Report;
with ada.ada__characters;
with ada;
with ada.ada__characters;
with ada;
with ada.ada__strings;
with jwa;
with jwa.jwa__strings;
with ada.ada__strings.ada__strings__maps;
with ada.ada__characters.ada__characters__handling;
with ada.ada__characters.ada__characters__latin_1;
with report;
with ada.ada__tags;
with system.system__finalization_root;
with system.system__finalization_implementation;
with system;
with ada.ada__finalization.ada__finalization__list_controller;
with interfaces;
with system.system__secondary_stack;
with system.system__soft_links;

-- 67:

-- 68: procedure Test_Jwa_CXA4030 is
procedure test_jwa_cxa4030 is
   test_block : label

-- 69:

-- 70: begin
begin

-- 71:

-- 72:    Report.Test ("CXA4030", "Check that Ada.Strings.Unbounded versions " &
   report.report__test ("CXA4030",

-- 73:                            "of subprograms Translate (procedure and "   &

-- 74:                            "function), Index, and Count, which use a "  &

-- 75:                            "Maps.Character_Mapping_Function input "     &
     "Check that Ada.Strings.Unbounded versions of subprograms Translate (procedure and function), Index, and Count, which use a Maps.Character_Mapping_Function input parameter, produce correct results");

-- 76:                            "parameter, produce correct results");

-- 77:

-- 78:    Test_Block:

-- 79:    declare
   test_block : declare
      M341b : system__secondary_stack__mark_id :=
        $system__secondary_stack__ss_mark;
      F9b : system__finalization_root__finalizable_ptr := null;
      procedure test_jwa_cxa4030__test_block___clean is
      begin
         system__soft_links__abort_defer.all;
         $system__finalization_implementation__finalize_list (F9b);
         $system__secondary_stack__ss_release (M341b);
         system__soft_links__abort_undefer.all;
         return;
      end test_jwa_cxa4030__test_block___clean;
   begin
      L17b : ada__finalization__list_controller__simple_list_controller;

-- 80:

-- 81:       package JS renames Jwa.Strings;
      $ada__finalization__list_controller__simple_list_controllerIP (
        L17b, P6s => true);
      $ada__finalization__initialize__2 (L17b);
      $system__finalization_implementation__attach_to_final_list (F9b,
        system__finalization_root__finalizable?(L17b), 1);
      F16b___XR_L17b___XEXRf : _renaming_type;
      F16b : system__finalization_root__finalizable_ptr renames L17b.f;
      L10b : ada__finalization__list_controller__simple_list_controller;
      $ada__finalization__list_controller__simple_list_controllerIP (
        L10b, P6s => true);
      $ada__finalization__initialize__2 (L10b);
      $system__finalization_implementation__attach_to_final_list (F9b,
        system__finalization_root__finalizable?(L10b), 1);
      F8b___XR_L10b___XEXRf : _renaming_type;
      F8b : system__finalization_root__finalizable_ptr renames L10b.f;
      js___XRP_jwa__strings___XE : _renaming_type;
      package js renames jwa.jwa__strings;

-- 82:       use type JS.String_8;
      use type jwa__strings.jwa__strings__string_8;

-- 83:       use Ada.Strings;
      use ada.ada__strings;

-- 84:       use Ada.Characters;
      use ada.ada__characters;

-- 85:

-- 86:
-- 87:       -- The following strings are used in examination of the Translation
-- 88:       -- subprograms.

-- 89:

-- 90:       New_Character_String : JS.String_8 :=

-- 91:                                JS.To_String_8(
      type test_jwa_cxa4030__test_block__A5b is access all
        jwa__strings__string_8;
      freeze test_jwa_cxa4030__test_block__A5b []
      R6b : test_jwa_cxa4030__test_block__A5b := jwa__strings.
        jwa__strings__create__2 ("["e0"]["e5"]["e6"]["e7"]["e9"]["ee"]["f0"]["f1"]["f8"]["fe"]")
        'reference;
      $system__finalization_implementation__deep_tag_attach (F8b, R6b.all'
        address, 1);
      new_character_string : jwa__strings.jwa__strings__string_8 := R6b.all;
      jwa__strings__adjust__2 (new_character_string);
      $system__finalization_implementation__attach_to_final_list (F9b,
        system__finalization_root__finalizable?(new_character_string),
        1);
      $ada__finalization__list_controller__finalize (L10b);
      new_character_string._tag := jwa__strings__string_8P;

-- 92:                                  Latin_1.LC_A_Grave          &

-- 93:                                  Latin_1.LC_A_Ring           &

-- 94:                                  Latin_1.LC_AE_Diphthong     &

-- 95:                                  Latin_1.LC_C_Cedilla        &

-- 96:                                  Latin_1.LC_E_Acute          &

-- 97:                                  Latin_1.LC_I_Circumflex     &

-- 98:                                  Latin_1.LC_Icelandic_Eth    &

-- 99:                                  Latin_1.LC_N_Tilde          &

-- 100:                                  Latin_1.LC_O_Oblique_Stroke &

-- 101:                                  Latin_1.LC_Icelandic_Thorn);

-- 102:

-- 103:

-- 104:       TC_New_Character_String : JS.String_8 :=

-- 105:                                   JS.To_String_8(
      type test_jwa_cxa4030__test_block__A13b is access all
        jwa__strings__string_8;
      freeze test_jwa_cxa4030__test_block__A13b []
      R14b : test_jwa_cxa4030__test_block__A13b := jwa__strings.
        jwa__strings__create__2 ("["c0"]["c5"]["c6"]["c7"]["c9"]["ce"]["d0"]["d1"]["d8"]["de"]")
        'reference;
      $system__finalization_implementation__deep_tag_attach (F16b, R14b.all'
        address, 1);
      tc_new_character_string : jwa__strings.jwa__strings__string_8 :=
        R14b.all;
      jwa__strings__adjust__2 (tc_new_character_string);
      $system__finalization_implementation__attach_to_final_list (F9b,
        system__finalization_root__finalizable?(tc_new_character_string),
        1);
      $ada__finalization__list_controller__finalize (L17b);
      tc_new_character_string._tag := jwa__strings__string_8P;
      map_to_lower_case_ptr : ada__strings__maps.
        ada__strings__maps__character_mapping_function :=
        ada__characters__handling.ada__characters__handling__to_lower'
        access;
      map_to_upper_case_ptr : ada__strings__maps.
        ada__strings__maps__character_mapping_function :=
        ada__characters__handling.ada__characters__handling__to_upper'
        access;
      B_1 : label
      B_2 : label
      B_3 : label
      begin
         E74b : boolean;

-- 106:                                     Latin_1.UC_A_Grave          &

-- 107:                                     Latin_1.UC_A_Ring           &

-- 108:                                     Latin_1.UC_AE_Diphthong     &

-- 109:                                     Latin_1.UC_C_Cedilla        &

-- 110:                                     Latin_1.UC_E_Acute          &

-- 111:                                     Latin_1.UC_I_Circumflex     &

-- 112:                                     Latin_1.UC_Icelandic_Eth    &

-- 113:                                     Latin_1.UC_N_Tilde          &

-- 114:                                     Latin_1.UC_O_Oblique_Stroke &

-- 115:                                     Latin_1.UC_Icelandic_Thorn);

-- 116:

-- 117:
-- 118:       -- In this test, access objects are defined to refer to two functions
-- 119:       -- from the Ada.Characters.Handling package.  These access objects
-- 120:       -- will be provided as parameters to the subprograms under test.
-- 121:       -- Note: There will be several examples in this test of these character
-- 122:       --       handling functions being referenced directly within the
-- 123:       --       parameter list of the subprograms under test.

-- 124:

-- 125:       Map_To_Lower_Case_Ptr : Maps.Character_Mapping_Function :=

-- 126:                                 Handling.To_Lower'Access;

-- 127:

-- 128:       Map_To_Upper_Case_Ptr : Maps.Character_Mapping_Function :=

-- 129:                                 Handling.To_Upper'Access;

-- 130:

-- 131:    begin

-- 132:
-- 133:       -- Function Index, Forward direction search.
-- 134:       -- Note: Several of the following cases use the default value
-- 135:       --       Forward for the Going parameter.

-- 136:

-- 137:       if JS.Index(Source => JS.To_String_8(

-- 138:                                "The library package Strings.Unbounded"),

-- 139:                    Pattern => "unb",

-- 140:                    Going   => Ada.Strings.Forward,

-- 141:                    Mapping => Map_To_Lower_Case_Ptr)    /= 29   or

-- 142:

-- 143:          JS.Index(JS.To_String_8(

-- 144:                      "THE RAIN IN SPAIN FALLS MAINLY ON THE PLAIN"),

-- 145:                    "ain",

-- 146:                    Mapping => Map_To_Lower_Case_Ptr)    /= 6    or

-- 147:

-- 148:          JS.Index(JS.To_String_8("maximum number"),

-- 149:                    "um",

-- 150:                    Ada.Strings.Forward,

-- 151:                    Handling.To_Lower'Access)            /= 6    or

-- 152:

-- 153:          JS.Index(JS.To_String_8("CoMpLeTeLy MiXeD CaSe StRiNg"),

-- 154:                    "MIXED CASE STRING",

-- 155:                    Ada.Strings.Forward,

-- 156:                    Map_To_Upper_Case_Ptr)               /= 12   or

-- 157:

-- 158:          JS.Index(JS.To_String_8(

-- 159:                      "STRING WITH NO MATCHING PATTERNS"),

-- 160:                    "WITH",

-- 161:                    Mapping => Map_To_Lower_Case_Ptr)    /= 0    or

-- 162:

-- 163:          JS.Index(JS.To_String_8("THIS STRING IS IN UPPER CASE"),

-- 164:                    "IS",

-- 165:                    Ada.Strings.Forward,

-- 166:                    Handling.To_Upper'Access)            /= 3    or

-- 167:

-- 168:          JS.Index(JS.Null_String_8,

-- 169:                    "is",

-- 170:                    Mapping => Map_To_Lower_Case_Ptr)    /= 0    or
         B28b : declare
            M75b : system__secondary_stack__mark_id :=
              $system__secondary_stack__ss_mark;
            F33b : system__finalization_root__finalizable_ptr := null;
            procedure test_jwa_cxa4030__test_block__B28b___clean is
            begin
               system__soft_links__abort_defer.all;
               $system__finalization_implementation__finalize_list (
                 F33b);
               $system__secondary_stack__ss_release (M75b);
               system__soft_links__abort_undefer.all;
               return;
            end test_jwa_cxa4030__test_block__B28b___clean;
         begin
            type test_jwa_cxa4030__test_block__B28b__A30b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A30b []
            R31b : test_jwa_cxa4030__test_block__B28b__A30b :=
              jwa__strings.jwa__strings__create__2 (
              "The library package Strings.Unbounded")'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R31b.all'address, 1);
            R35b : constant natural := jwa__strings.
              jwa__strings__index__2 (source => R31b.all, pattern =>
              "unb", going => ada.ada__strings.ada__strings__forward,
              mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R35b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B28b__A37b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A37b []
            R38b : test_jwa_cxa4030__test_block__B28b__A37b :=
              jwa__strings.jwa__strings__create__2 (
              "THE RAIN IN SPAIN FALLS MAINLY ON THE PLAIN")'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R38b.all'address, 1);
            R41b : constant natural := jwa__strings.
              jwa__strings__index__2 (R38b.all, "ain", going =>
              ada__strings__forward, mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R41b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B28b__A43b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A43b []
            R44b : test_jwa_cxa4030__test_block__B28b__A43b :=
              jwa__strings.jwa__strings__create__2 ("maximum number")
              'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R44b.all'address, 1);
            R47b : constant natural := jwa__strings.
              jwa__strings__index__2 (R44b.all, "um", ada.ada__strings.
              ada__strings__forward, ada__characters__handling.
              ada__characters__handling__to_lower'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R47b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B28b__A49b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A49b []
            R50b : test_jwa_cxa4030__test_block__B28b__A49b :=
              jwa__strings.jwa__strings__create__2 (
              "CoMpLeTeLy MiXeD CaSe StRiNg")'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R50b.all'address, 1);
            R53b : constant natural := jwa__strings.
              jwa__strings__index__2 (R50b.all, "MIXED CASE STRING",
              ada.ada__strings.ada__strings__forward,
              map_to_upper_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R53b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B28b__A55b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A55b []
            R56b : test_jwa_cxa4030__test_block__B28b__A55b :=
              jwa__strings.jwa__strings__create__2 (
              "STRING WITH NO MATCHING PATTERNS")'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R56b.all'address, 1);
            R59b : constant natural := jwa__strings.
              jwa__strings__index__2 (R56b.all, "WITH", going =>
              ada__strings__forward, mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R59b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B28b__A61b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A61b []
            R62b : test_jwa_cxa4030__test_block__B28b__A61b :=
              jwa__strings.jwa__strings__create__2 (
              "THIS STRING IS IN UPPER CASE")'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R62b.all'address, 1);
            R65b : constant natural := jwa__strings.
              jwa__strings__index__2 (R62b.all, "IS", ada.ada__strings.
              ada__strings__forward, ada__characters__handling.
              ada__characters__handling__to_upper'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R65b) <= 16#7FFF_FFFF#)
              "invalid data"]
            R67b : constant natural := jwa__strings.
              jwa__strings__index__2 (jwa__strings.
              jwa__strings__null_string_8, "is", going =>
              ada__strings__forward, mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R67b) <= 16#7FFF_FFFF#)
              "invalid data"]

-- 171:

-- 172:          JS.Index(JS.To_String_8("AAABBBaaabbb"),
            type test_jwa_cxa4030__test_block__B28b__A69b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B28b__A69b []
            R70b : test_jwa_cxa4030__test_block__B28b__A69b :=
              jwa__strings.jwa__strings__create__2 ("AAABBBaaabbb")
              'reference;
            $system__finalization_implementation__deep_tag_attach (F33b,
              R70b.all'address, 1);
            R73b : constant natural := jwa__strings.
              jwa__strings__index__2 (R70b.all, "aabb", going =>
              ada__strings__forward, mapping =>
              ada__characters__handling.
              ada__characters__handling__to_lower'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R73b) <= 16#7FFF_FFFF#)
              "invalid data"]
            E74b := R35b /= 29 or R41b /= 6 or R47b /= 6 or R53b /=
              12 or R59b /= 0 or R65b /= 3 or R67b /= 0 or R73b /=

-- 173:                    "aabb",

-- 174:                    Mapping => Handling.To_Lower'Access) /= 2
              2;
         at end
            test_jwa_cxa4030__test_block__B28b___clean;
         end B28b;
         if E74b then

-- 175:       then

-- 176:          Report.Failed("Incorrect results from Function Index, going "    &
            report.report__failed (

-- 177:                        "in Forward direction, using a Character Mapping " &
              "Incorrect results from Function Index, going in Forward direction, using a Character Mapping Function parameter");
         end if;
         E113b : boolean;

-- 178:                        "Function parameter");

-- 179:       end if;

-- 180:

-- 181:

-- 182:
-- 183:       -- Function Index, Backward direction search.

-- 184:

-- 185:       if JS.Index(JS.To_String_8("Case of a Mixed Case String"),

-- 186:                    "case",

-- 187:                    Ada.Strings.Backward,

-- 188:                    Map_To_Lower_Case_Ptr)               /= 17   or

-- 189:

-- 190:          JS.Index(JS.To_String_8("Case of a Mixed Case String"),

-- 191:                    "CASE",

-- 192:                    Ada.Strings.Backward,

-- 193:                    Mapping => Map_To_Upper_Case_Ptr)    /= 17   or

-- 194:

-- 195:          JS.Index(JS.To_String_8("rain, Rain, and more RAIN"),

-- 196:                    "rain",

-- 197:                    Ada.Strings.Backward,

-- 198:                    Handling.To_Lower'Access)            /= 22   or

-- 199:

-- 200:          JS.Index(JS.To_String_8("RIGHT place, right time"),

-- 201:                    "RIGHT",

-- 202:                    Ada.Strings.Backward,

-- 203:                    Handling.To_Upper'Access)            /= 14   or
         B81b : declare
            M114b : system__secondary_stack__mark_id :=
              $system__secondary_stack__ss_mark;
            F86b : system__finalization_root__finalizable_ptr := null;
            procedure test_jwa_cxa4030__test_block__B81b___clean is
            begin
               system__soft_links__abort_defer.all;
               $system__finalization_implementation__finalize_list (
                 F86b);
               $system__secondary_stack__ss_release (M114b);
               system__soft_links__abort_undefer.all;
               return;
            end test_jwa_cxa4030__test_block__B81b___clean;
         begin
            type test_jwa_cxa4030__test_block__B81b__A83b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B81b__A83b []
            R84b : test_jwa_cxa4030__test_block__B81b__A83b :=
              jwa__strings.jwa__strings__create__2 (
              "Case of a Mixed Case String")'reference;
            $system__finalization_implementation__deep_tag_attach (F86b,
              R84b.all'address, 1);
            R88b : constant natural := jwa__strings.
              jwa__strings__index__2 (R84b.all, "case", ada.
              ada__strings.ada__strings__backward,
              map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R88b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B81b__A90b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B81b__A90b []
            R91b : test_jwa_cxa4030__test_block__B81b__A90b :=
              jwa__strings.jwa__strings__create__2 (
              "Case of a Mixed Case String")'reference;
            $system__finalization_implementation__deep_tag_attach (F86b,
              R91b.all'address, 1);
            R94b : constant natural := jwa__strings.
              jwa__strings__index__2 (R91b.all, "CASE", ada.
              ada__strings.ada__strings__backward, mapping =>
              map_to_upper_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R94b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B81b__A96b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B81b__A96b []
            R97b : test_jwa_cxa4030__test_block__B81b__A96b :=
              jwa__strings.jwa__strings__create__2 (
              "rain, Rain, and more RAIN")'reference;
            $system__finalization_implementation__deep_tag_attach (F86b,
              R97b.all'address, 1);
            R100b : constant natural := jwa__strings.
              jwa__strings__index__2 (R97b.all, "rain", ada.
              ada__strings.ada__strings__backward,
              ada__characters__handling.
              ada__characters__handling__to_lower'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R100b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B81b__A102b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B81b__A102b []
            R103b : test_jwa_cxa4030__test_block__B81b__A102b :=
              jwa__strings.jwa__strings__create__2 (
              "RIGHT place, right time")'reference;
            $system__finalization_implementation__deep_tag_attach (F86b,
              R103b.all'address, 1);
            R106b : constant natural := jwa__strings.
              jwa__strings__index__2 (R103b.all, "RIGHT", ada.
              ada__strings.ada__strings__backward,
              ada__characters__handling.
              ada__characters__handling__to_upper'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R106b) <= 16#7FFF_FFFF#)
              "invalid data"]

-- 204:

-- 205:          JS.Index(JS.To_String_8("WOULD MATCH BUT FOR THE CASE"),
            type test_jwa_cxa4030__test_block__B81b__A108b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B81b__A108b []
            R109b : test_jwa_cxa4030__test_block__B81b__A108b :=
              jwa__strings.jwa__strings__create__2 (
              "WOULD MATCH BUT FOR THE CASE")'reference;
            $system__finalization_implementation__deep_tag_attach (F86b,
              R109b.all'address, 1);
            R112b : constant natural := jwa__strings.
              jwa__strings__index__2 (R109b.all,

-- 206:                    "WOULD MATCH BUT FOR THE CASE",
              "WOULD MATCH BUT FOR THE CASE", going => ada.ada__strings.
              ada__strings__backward, mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R112b) <= 16#7FFF_FFFF#)
              "invalid data"]
            E113b := R88b /= 17 or R94b /= 17 or R100b /= 22 or R106b /=
              14 or R112b /= 0;
         at end
            test_jwa_cxa4030__test_block__B81b___clean;
         end B81b;
         if E113b then

-- 207:                    Going   => Ada.Strings.Backward,

-- 208:                    Mapping => Map_To_Lower_Case_Ptr)    /= 0

-- 209:       then

-- 210:          Report.Failed("Incorrect results from Function Index, going "     &
            report.report__failed (

-- 211:                        "in Backward direction, using a Character Mapping " &
              "Incorrect results from Function Index, going in Backward direction, using a Character Mapping Function parameter");
         end if;

-- 212:                        "Function parameter");

-- 213:       end if;

-- 214:

-- 215:

-- 216:
-- 217:       -- Function Index, Pattern_Error if Pattern = Null_String

-- 218:

-- 219:       declare
         B_1 : declare

-- 220:          use Jwa.Strings;
            use jwa.jwa__strings;

-- 221:          Null_String : constant String := "";
            subtype test_jwa_cxa4030__test_block__B_1__Tnull_stringS is
              string (1 .. 0);
            null_string : constant string (1 .. 0) := "";
            tc_natural : natural := 1000;
         begin

-- 222:          TC_Natural  : Natural         := 1000;

-- 223:       begin

-- 224:          TC_Natural := Index(To_String_8("A Valid Unbounded String"),
            B119b : declare
               M126b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F124b : system__finalization_root__finalizable_ptr :=
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_1__B119b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F124b);
                  $system__secondary_stack__ss_release (M126b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_1__B119b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_1__B119b__A121b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_1__B119b__A121b []
               R122b : test_jwa_cxa4030__test_block__B_1__B119b__A121b :=
                 jwa__strings__create__2 ("A Valid Unbounded String")
                 'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F124b, R122b.all'address, 1);
               R125b : constant natural := jwa__strings__index__2 (
                 R122b.all, null_string, going => ada.ada__strings.
                 ada__strings__forward, mapping =>
                 ada__characters__handling.
                 ada__characters__handling__to_lower'access);
               [constraint_error when
                 not (interfaces__unsigned_32!(R125b) <=
                   16#7FFF_FFFF#)
                 "invalid data"]
               tc_natural := R125b;
            at end
               test_jwa_cxa4030__test_block__B_1__B119b___clean;
            end B119b;

-- 225:                              Null_String,

-- 226:                              Going   => Ada.Strings.Forward,

-- 227:                              Mapping => Handling.To_Lower'Access);

-- 228:          Report.Failed("Pattern_Error not raised by Function Index when " &
            report.report__failed (
              "Pattern_Error not raised by Function Index when given a null pattern string");
         exception

-- 229:                        "given a null pattern string");

-- 230:       exception

-- 231:          when Pattern_Error => null;   -- OK, expected exception.
            when ada__strings__pattern_error =>
               system__soft_links__abort_undefer.all;
               null;

-- 232:          when others        =>
            when others =>
               system__soft_links__abort_undefer.all;

-- 233:             Report.Failed("Incorrect exception raised by Function Index " &
               report.report__failed (

-- 234:                           "using a Character Mapping Function parameter " &
                 "Incorrect exception raised by Function Index using a Character Mapping Function parameter when given a null pattern string");
         end B_1;
         E173b : boolean;

-- 235:                           "when given a null pattern string");

-- 236:       end;

-- 237:

-- 238:

-- 239:
-- 240:       -- Function Count.

-- 241:

-- 242:       if JS.Count(Source  => JS.To_String_8("ABABABA"),

-- 243:                    Pattern => "aba",

-- 244:                    Mapping => Map_To_Lower_Case_Ptr)   /=  2   or

-- 245:

-- 246:          JS.Count(JS.To_String_8("ABABABA"),

-- 247:                    "ABA",

-- 248:                    Mapping => Map_To_Lower_Case_Ptr)   /=  0   or

-- 249:

-- 250:          JS.Count(JS.To_String_8("This IS a MISmatched issue"),

-- 251:                    "is",

-- 252:                    Handling.To_Lower'Access)           /=  4   or

-- 253:

-- 254:          JS.Count(JS.To_String_8("ABABABA"),

-- 255:                    "ABA",

-- 256:                    Map_To_Upper_Case_Ptr)              /=  2   or

-- 257:

-- 258:          JS.Count(JS.To_String_8("This IS a MISmatched issue"),

-- 259:                    "is",

-- 260:                    Mapping => Map_To_Upper_Case_Ptr)   /=  0   or

-- 261:

-- 262:          JS.Count(JS.To_String_8(

-- 263:                      "She sells sea shells by the sea shore"),

-- 264:                    "s",

-- 265:                    Handling.To_Lower'Access)           /=  8   or
         B133b : declare
            M174b : system__secondary_stack__mark_id :=
              $system__secondary_stack__ss_mark;
            F138b : system__finalization_root__finalizable_ptr := null;
            procedure test_jwa_cxa4030__test_block__B133b___clean is
            begin
               system__soft_links__abort_defer.all;
               $system__finalization_implementation__finalize_list (
                 F138b);
               $system__secondary_stack__ss_release (M174b);
               system__soft_links__abort_undefer.all;
               return;
            end test_jwa_cxa4030__test_block__B133b___clean;
         begin
            type test_jwa_cxa4030__test_block__B133b__A135b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A135b []
            R136b : test_jwa_cxa4030__test_block__B133b__A135b :=
              jwa__strings.jwa__strings__create__2 ("ABABABA")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R136b.all'address, 1);
            R140b : constant natural := jwa__strings.
              jwa__strings__count__2 (source => R136b.all, pattern =>
              "aba", mapping => map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R140b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B133b__A142b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A142b []
            R143b : test_jwa_cxa4030__test_block__B133b__A142b :=
              jwa__strings.jwa__strings__create__2 ("ABABABA")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R143b.all'address, 1);
            R146b : constant natural := jwa__strings.
              jwa__strings__count__2 (R143b.all, "ABA", mapping =>
              map_to_lower_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R146b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B133b__A148b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A148b []
            R149b : test_jwa_cxa4030__test_block__B133b__A148b :=
              jwa__strings.jwa__strings__create__2 (
              "This IS a MISmatched issue")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R149b.all'address, 1);
            R152b : constant natural := jwa__strings.
              jwa__strings__count__2 (R149b.all, "is",
              ada__characters__handling.
              ada__characters__handling__to_lower'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R152b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B133b__A154b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A154b []
            R155b : test_jwa_cxa4030__test_block__B133b__A154b :=
              jwa__strings.jwa__strings__create__2 ("ABABABA")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R155b.all'address, 1);
            R158b : constant natural := jwa__strings.
              jwa__strings__count__2 (R155b.all, "ABA",
              map_to_upper_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R158b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B133b__A160b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A160b []
            R161b : test_jwa_cxa4030__test_block__B133b__A160b :=
              jwa__strings.jwa__strings__create__2 (
              "This IS a MISmatched issue")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R161b.all'address, 1);
            R164b : constant natural := jwa__strings.
              jwa__strings__count__2 (R161b.all, "is", mapping =>
              map_to_upper_case_ptr);
            [constraint_error when
              not (interfaces__unsigned_32!(R164b) <= 16#7FFF_FFFF#)
              "invalid data"]
            type test_jwa_cxa4030__test_block__B133b__A166b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B133b__A166b []
            R167b : test_jwa_cxa4030__test_block__B133b__A166b :=
              jwa__strings.jwa__strings__create__2 (
              "She sells sea shells by the sea shore")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F138b, R167b.all'address, 1);
            R170b : constant natural := jwa__strings.
              jwa__strings__count__2 (R167b.all, "s",
              ada__characters__handling.
              ada__characters__handling__to_lower'access);
            [constraint_error when
              not (interfaces__unsigned_32!(R170b) <= 16#7FFF_FFFF#)
              "invalid data"]
            R172b : constant natural := jwa__strings.
              jwa__strings__count__2 (jwa__strings.
              jwa__strings__null_string_8, "match",
              map_to_upper_case_ptr);

-- 266:

-- 267:          JS.Count(JS.Null_String_8,
            [constraint_error when
              not (interfaces__unsigned_32!(R172b) <= 16#7FFF_FFFF#)
              "invalid data"]
            E173b := R140b /= 2 or R146b /= 0 or R152b /= 4 or R158b /=
              2 or R164b /= 0 or R170b /= 8 or R172b /= 0;
         at end
            test_jwa_cxa4030__test_block__B133b___clean;
         end B133b;
         if E173b then

-- 268:                    "match",

-- 269:                    Map_To_Upper_Case_Ptr)              /=  0

-- 270:       then

-- 271:          Report.Failed("Incorrect results from Function Count, using " &
            report.report__failed (
              "Incorrect results from Function Count, using a Character Mapping Function parameter");
         end if;

-- 272:                        "a Character Mapping Function parameter");

-- 273:       end if;

-- 274:

-- 275:

-- 276:
-- 277:       -- Function Count, Pattern_Error if Pattern = Null_String

-- 278:

-- 279:       declare
         B_2 : declare

-- 280:          use Jwa.Strings;
            use jwa.jwa__strings;

-- 281:          Null_Pattern_String : constant String := "";
            subtype
              test_jwa_cxa4030__test_block__B_2__Tnull_pattern_stringS is
              string (1 .. 0);
            null_pattern_string : constant string (1 .. 0) := "";
            tc_natural : natural := 1000;
         begin

-- 282:          TC_Natural          : Natural         := 1000;

-- 283:       begin

-- 284:          TC_Natural := Count(To_String_8("A Valid String"),
            B177b : declare
               M184b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F182b : system__finalization_root__finalizable_ptr :=
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_2__B177b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F182b);
                  $system__secondary_stack__ss_release (M184b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_2__B177b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_2__B177b__A179b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_2__B177b__A179b []
               R180b : test_jwa_cxa4030__test_block__B_2__B177b__A179b :=
                 jwa__strings__create__2 ("A Valid String")'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F182b, R180b.all'address, 1);
               R183b : constant natural := jwa__strings__count__2 (
                 R180b.all, null_pattern_string, map_to_lower_case_ptr);
               [constraint_error when
                 not (interfaces__unsigned_32!(R183b) <=
                   16#7FFF_FFFF#)
                 "invalid data"]
               tc_natural := R183b;
            at end
               test_jwa_cxa4030__test_block__B_2__B177b___clean;
            end B177b;

-- 285:                              Null_Pattern_String,

-- 286:                              Map_To_Lower_Case_Ptr);

-- 287:          Report.Failed("Pattern_Error not raised by Function Count using " &
            report.report__failed (

-- 288:                        "a Character Mapping Function parameter when "      &
              "Pattern_Error not raised by Function Count using a Character Mapping Function parameter when given a null pattern string");
         exception

-- 289:                        "given a null pattern string");

-- 290:       exception

-- 291:          when Pattern_Error => null;   -- OK, expected exception.
            when ada__strings__pattern_error =>
               system__soft_links__abort_undefer.all;
               null;

-- 292:          when others        =>
            when others =>
               system__soft_links__abort_undefer.all;

-- 293:             Report.Failed("Incorrect exception raised by Function Count " &
               report.report__failed (

-- 294:                           "using a Character Mapping Function parameter " &
                 "Incorrect exception raised by Function Count using a Character Mapping Function parameter when given a null pattern string");
         end B_2;
         E269b : boolean;

-- 295:                           "when given a null pattern string");

-- 296:       end;

-- 297:

-- 298:

-- 299:
-- 300:       -- Function Translate.

-- 301:

-- 302:       if JS.Translate(Source  => JS.To_String_8(

-- 303:                                     "A Sample Mixed Case String"),

-- 304:                        Mapping => Map_To_Lower_Case_Ptr)           /=

-- 305:          JS.To_String_8("a sample mixed case string")       or

-- 306:

-- 307:          JS.Translate(JS.To_String_8("ALL LOWER CASE"),

-- 308:                        Handling.To_Lower'Access)                   /=

-- 309:          JS.To_String_8("all lower case")                   or

-- 310:

-- 311:          JS.Translate(JS.To_String_8("end with lower case"),

-- 312:                        Map_To_Lower_Case_Ptr)                      /=

-- 313:          JS.To_String_8("end with lower case")              or

-- 314:

-- 315:          JS.Translate(JS.Null_String_8,

-- 316:                        Handling.To_Lower'Access)                   /=

-- 317:          JS.Null_String_8                                   or

-- 318:

-- 319:          JS.Translate(JS.To_String_8("start with lower case"),

-- 320:                        Map_To_Upper_Case_Ptr)                      /=

-- 321:          JS.To_String_8("START WITH LOWER CASE")            or

-- 322:

-- 323:          JS.Translate(JS.To_String_8("ALL UPPER CASE STRING"),

-- 324:                        Handling.To_Upper'Access)                   /=

-- 325:          JS.To_String_8("ALL UPPER CASE STRING")            or

-- 326:

-- 327:          JS.Translate(JS.To_String_8(

-- 328:                          "LoTs Of MiXeD CaSe ChArAcTeRs"),

-- 329:                        Map_To_Upper_Case_Ptr)                      /=

-- 330:          JS.To_String_8("LOTS OF MIXED CASE CHARACTERS")    or
         B195b : declare
            M270b : system__secondary_stack__mark_id :=
              $system__secondary_stack__ss_mark;
            F200b : system__finalization_root__finalizable_ptr := null;
            procedure test_jwa_cxa4030__test_block__B195b___clean is
            begin
               system__soft_links__abort_defer.all;
               $system__finalization_implementation__finalize_list (
                 F200b);
               $system__secondary_stack__ss_release (M270b);
               system__soft_links__abort_undefer.all;
               return;
            end test_jwa_cxa4030__test_block__B195b___clean;
         begin
            type test_jwa_cxa4030__test_block__B195b__A197b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A197b []
            R198b : test_jwa_cxa4030__test_block__B195b__A197b :=
              jwa__strings.jwa__strings__create__2 (
              "A Sample Mixed Case String")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R198b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A201b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A201b []
            R202b : test_jwa_cxa4030__test_block__B195b__A201b :=
              jwa__strings.jwa__strings__translate__3 (source => R198b.all,
              mapping => map_to_lower_case_ptr)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R202b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A205b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A205b []
            R206b : test_jwa_cxa4030__test_block__B195b__A205b :=
              jwa__strings.jwa__strings__create__2 (
              "a sample mixed case string")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R206b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A209b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A209b []
            R210b : test_jwa_cxa4030__test_block__B195b__A209b :=
              jwa__strings.jwa__strings__create__2 ("ALL LOWER CASE")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R210b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A212b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A212b []
            R213b : test_jwa_cxa4030__test_block__B195b__A212b :=
              jwa__strings.jwa__strings__translate__3 (R210b.all,
              ada__characters__handling.
              ada__characters__handling__to_lower'access)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R213b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A216b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A216b []
            R217b : test_jwa_cxa4030__test_block__B195b__A216b :=
              jwa__strings.jwa__strings__create__2 ("all lower case")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R217b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A220b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A220b []
            R221b : test_jwa_cxa4030__test_block__B195b__A220b :=
              jwa__strings.jwa__strings__create__2 ("end with lower case")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R221b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A223b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A223b []
            R224b : test_jwa_cxa4030__test_block__B195b__A223b :=
              jwa__strings.jwa__strings__translate__3 (R221b.all,
              map_to_lower_case_ptr)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R224b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A227b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A227b []
            R228b : test_jwa_cxa4030__test_block__B195b__A227b :=
              jwa__strings.jwa__strings__create__2 ("end with lower case")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R228b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A230b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A230b []
            R231b : test_jwa_cxa4030__test_block__B195b__A230b :=
              jwa__strings.jwa__strings__translate__3 (jwa__strings.
              jwa__strings__null_string_8, ada__characters__handling.
              ada__characters__handling__to_lower'access)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R231b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A234b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A234b []
            R235b : test_jwa_cxa4030__test_block__B195b__A234b :=
              jwa__strings.jwa__strings__create__2 (
              "start with lower case")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R235b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A237b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A237b []
            R238b : test_jwa_cxa4030__test_block__B195b__A237b :=
              jwa__strings.jwa__strings__translate__3 (R235b.all,
              map_to_upper_case_ptr)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R238b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A241b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A241b []
            R242b : test_jwa_cxa4030__test_block__B195b__A241b :=
              jwa__strings.jwa__strings__create__2 (
              "START WITH LOWER CASE")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R242b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A245b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A245b []
            R246b : test_jwa_cxa4030__test_block__B195b__A245b :=
              jwa__strings.jwa__strings__create__2 (
              "ALL UPPER CASE STRING")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R246b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A248b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A248b []
            R249b : test_jwa_cxa4030__test_block__B195b__A248b :=
              jwa__strings.jwa__strings__translate__3 (R246b.all,
              ada__characters__handling.
              ada__characters__handling__to_upper'access)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R249b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A252b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A252b []
            R253b : test_jwa_cxa4030__test_block__B195b__A252b :=
              jwa__strings.jwa__strings__create__2 (
              "ALL UPPER CASE STRING")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R253b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A256b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A256b []
            R257b : test_jwa_cxa4030__test_block__B195b__A256b :=
              jwa__strings.jwa__strings__create__2 (
              "LoTs Of MiXeD CaSe ChArAcTeRs")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R257b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A259b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A259b []
            R260b : test_jwa_cxa4030__test_block__B195b__A259b :=
              jwa__strings.jwa__strings__translate__3 (R257b.all,
              map_to_upper_case_ptr)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R260b.all'address, 1);
            type test_jwa_cxa4030__test_block__B195b__A263b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A263b []
            R264b : test_jwa_cxa4030__test_block__B195b__A263b :=
              jwa__strings.jwa__strings__create__2 (
              "LOTS OF MIXED CASE CHARACTERS")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R264b.all'address, 1);

-- 331:

-- 332:          JS.Translate(New_Character_String,
            type test_jwa_cxa4030__test_block__B195b__A266b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B195b__A266b []
            R267b : test_jwa_cxa4030__test_block__B195b__A266b :=
              jwa__strings.jwa__strings__translate__3 (
              new_character_string, ada__characters__handling.
              ada__characters__handling__to_upper'access)'reference;
            $system__finalization_implementation__deep_tag_attach (
              F200b, R267b.all'address, 1);
            E269b := not (jwa__strings__Oeq (R202b.all, R206b.all)) or not
              (jwa__strings__Oeq (R213b.all, R217b.all)) or not (
              jwa__strings__Oeq (R224b.all, R228b.all)) or not (
              jwa__strings__Oeq (R231b.all, jwa__strings.
              jwa__strings__null_string_8)) or not (jwa__strings__Oeq (
              R238b.all, R242b.all)) or not (jwa__strings__Oeq (R249b.all,
              R253b.all)) or not (jwa__strings__Oeq (R260b.all, R264b.all)) or not
              (jwa__strings__Oeq (R267b.all, tc_new_character_string));
         at end
            test_jwa_cxa4030__test_block__B195b___clean;
         end B195b;
         if E269b then

-- 333:                        Handling.To_Upper'Access)                   /=

-- 334:          TC_New_Character_String

-- 335:

-- 336:       then

-- 337:          Report.Failed("Incorrect results from Function Translate, using " &
            report.report__failed (
              "Incorrect results from Function Translate, using a Character Mapping Function parameter");
         end if;

-- 338:                        "a Character Mapping Function parameter");

-- 339:       end if;

-- 340:

-- 341:

-- 342:
-- 343:       -- Procedure Translate.

-- 344:

-- 345:       declare
         B_3 : declare
            M339b : system__secondary_stack__mark_id :=
              $system__secondary_stack__ss_mark;
            F278b : system__finalization_root__finalizable_ptr := null;
            procedure test_jwa_cxa4030__test_block__B_3___clean is
            begin
               system__soft_links__abort_defer.all;
               $system__finalization_implementation__finalize_list (
                 F278b);
               $system__secondary_stack__ss_release (M339b);
               system__soft_links__abort_undefer.all;
               return;
            end test_jwa_cxa4030__test_block__B_3___clean;
         begin
            L293b :
              ada__finalization__list_controller__simple_list_controller;

-- 346:

-- 347:          use Jwa.Strings;

              $
              ada__finalization__list_controller__simple_list_controllerIP
              (L293b, P6s => true);
            $ada__finalization__initialize__2 (L293b);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(L293b),
              1);
            F292b___XR_L293b___XEXRf : _renaming_type;
            F292b : system__finalization_root__finalizable_ptr renames
              L293b.f;
            L286b :
              ada__finalization__list_controller__simple_list_controller;

              $
              ada__finalization__list_controller__simple_list_controllerIP
              (L286b, P6s => true);
            $ada__finalization__initialize__2 (L286b);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(L286b),
              1);
            F285b___XR_L286b___XEXRf : _renaming_type;
            F285b : system__finalization_root__finalizable_ptr renames
              L286b.f;
            L279b :
              ada__finalization__list_controller__simple_list_controller;

              $
              ada__finalization__list_controller__simple_list_controllerIP
              (L279b, P6s => true);
            $ada__finalization__initialize__2 (L279b);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(L279b),
              1);
            F277b___XR_L279b___XEXRf : _renaming_type;
            F277b : system__finalization_root__finalizable_ptr renames
              L279b.f;

-- 348:          use Ada.Characters.Handling;
            use jwa.jwa__strings;
            use ada.ada__characters.ada__characters__handling;

-- 349:

-- 350:          Str_1    : String_8 :=

-- 351:                       To_String_8("AN ALL UPPER CASE STRING");
            type test_jwa_cxa4030__test_block__B_3__A274b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B_3__A274b []
            R275b : test_jwa_cxa4030__test_block__B_3__A274b :=
              jwa__strings__create__2 ("AN ALL UPPER CASE STRING")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F277b, R275b.all'address, 1);
            str_1 : jwa__strings__string_8 := R275b.all;
            jwa__strings__adjust__2 (str_1);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(str_1),
              1);
            $ada__finalization__list_controller__finalize (L279b);
            str_1._tag := jwa__strings__string_8P;

-- 352:          Str_2    : String_8 :=

-- 353:                       To_String_8("A Mixed Case String");
            type test_jwa_cxa4030__test_block__B_3__A282b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B_3__A282b []
            R283b : test_jwa_cxa4030__test_block__B_3__A282b :=
              jwa__strings__create__2 ("A Mixed Case String")'reference;
            $system__finalization_implementation__deep_tag_attach (
              F285b, R283b.all'address, 1);
            str_2 : jwa__strings__string_8 := R283b.all;
            jwa__strings__adjust__2 (str_2);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(str_2),
              1);
            $ada__finalization__list_controller__finalize (L286b);
            str_2._tag := jwa__strings__string_8P;

-- 354:          Str_3    : String_8 :=

-- 355:                       To_String_8("a string with lower case letters");
            type test_jwa_cxa4030__test_block__B_3__A289b is access
              all jwa__strings__string_8;
            freeze test_jwa_cxa4030__test_block__B_3__A289b []
            R290b : test_jwa_cxa4030__test_block__B_3__A289b :=
              jwa__strings__create__2 ("a string with lower case letters")
              'reference;
            $system__finalization_implementation__deep_tag_attach (
              F292b, R290b.all'address, 1);
            str_3 : jwa__strings__string_8 := R290b.all;
            jwa__strings__adjust__2 (str_3);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(str_3),
              1);
            $ada__finalization__list_controller__finalize (L293b);
            str_3._tag := jwa__strings__string_8P;
            tc_str_1 : constant jwa__strings__string_8 := str_1;

-- 356:          TC_Str_1 : constant String_8 := Str_1;
            tc_str_1._tag := jwa__strings__string_8P;
            jwa__strings__adjust__2 (tc_str_1);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(tc_str_1),
              1);
            tc_str_3 : constant jwa__strings__string_8 := str_3;

-- 357:          TC_Str_3 : constant String_8 := Str_3;
            tc_str_3._tag := jwa__strings__string_8P;
            jwa__strings__adjust__2 (tc_str_3);
            $system__finalization_implementation__attach_to_final_list
              (F278b, system__finalization_root__finalizable?(tc_str_3),
              1);

-- 358:

-- 359:       begin

-- 360:

-- 361:          Translate(Source => Str_1, Mapping => Map_To_Lower_Case_Ptr);
            jwa__strings__translate__4 (source => str_1, mapping =>
              map_to_lower_case_ptr);
            E300b : boolean;

-- 362:

-- 363:          if Str_1 /= To_String_8("an all upper case string") then
            B294b : declare
               M301b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F299b : system__finalization_root__finalizable_ptr :=
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_3__B294b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F299b);
                  $system__secondary_stack__ss_release (M301b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_3__B294b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_3__B294b__A296b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_3__B294b__A296b []
               R297b : test_jwa_cxa4030__test_block__B_3__B294b__A296b :=
                 jwa__strings__create__2 ("an all upper case string")
                 'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F299b, R297b.all'address, 1);
               E300b := not (jwa__strings__Oeq (str_1, R297b.all));
            at end
               test_jwa_cxa4030__test_block__B_3__B294b___clean;
            end B294b;
            if E300b then

-- 364:             Report.Failed("Incorrect result from Procedure Translate - 1");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 1");

-- 365:          end if;
            end if;

-- 366:

-- 367:          Translate(Source => Str_1, Mapping => Map_To_Upper_Case_Ptr);
            jwa__strings__translate__4 (source => str_1, mapping =>
              map_to_upper_case_ptr);

-- 368:

-- 369:          if Str_1 /= TC_Str_1 then
            if not (jwa__strings__Oeq (str_1, tc_str_1)) then

-- 370:             Report.Failed("Incorrect result from Procedure Translate - 2");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 2");

-- 371:          end if;
            end if;

-- 372:

-- 373:          Translate(Str_2, Mapping => Map_To_Lower_Case_Ptr);
            jwa__strings__translate__4 (str_2, mapping =>
              map_to_lower_case_ptr);
            E310b : boolean;

-- 374:

-- 375:          if Str_2 /= To_String_8("a mixed case string") then
            B304b : declare
               M311b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F309b : system__finalization_root__finalizable_ptr :=
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_3__B304b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F309b);
                  $system__secondary_stack__ss_release (M311b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_3__B304b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_3__B304b__A306b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_3__B304b__A306b []
               R307b : test_jwa_cxa4030__test_block__B_3__B304b__A306b :=
                 jwa__strings__create__2 ("a mixed case string")
                 'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F309b, R307b.all'address, 1);
               E310b := not (jwa__strings__Oeq (str_2, R307b.all));
            at end
               test_jwa_cxa4030__test_block__B_3__B304b___clean;
            end B304b;
            if E310b then

-- 376:             Report.Failed("Incorrect result from Procedure Translate - 3");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 3");

-- 377:          end if;
            end if;

-- 378:

-- 379:          Translate(Str_2, Mapping => To_Upper'Access);
            jwa__strings__translate__4 (str_2, mapping =>
              ada__characters__handling__to_upper'access);
            E321b : boolean;

-- 380:

-- 381:          if Str_2 /= To_String_8("A MIXED CASE STRING") then
            B315b : declare
               M322b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F320b : system__finalization_root__finalizable_ptr :=
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_3__B315b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F320b);
                  $system__secondary_stack__ss_release (M322b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_3__B315b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_3__B315b__A317b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_3__B315b__A317b []
               R318b : test_jwa_cxa4030__test_block__B_3__B315b__A317b :=
                 jwa__strings__create__2 ("A MIXED CASE STRING")
                 'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F320b, R318b.all'address, 1);
               E321b := not (jwa__strings__Oeq (str_2, R318b.all));
            at end
               test_jwa_cxa4030__test_block__B_3__B315b___clean;
            end B315b;
            if E321b then

-- 382:             Report.Failed("Incorrect result from Procedure Translate - 4");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 4");

-- 383:          end if;
            end if;

-- 384:

-- 385:          Translate(Str_3, To_Lower'Access);
            jwa__strings__translate__4 (str_3,
              ada__characters__handling__to_lower'access);

-- 386:

-- 387:          if Str_3 /= TC_Str_3 then
            if not (jwa__strings__Oeq (str_3, tc_str_3)) then

-- 388:             Report.Failed("Incorrect result from Procedure Translate - 5");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 5");

-- 389:          end if;
            end if;

-- 390:

-- 391:          Translate(Str_3, To_Upper'Access);
            jwa__strings__translate__4 (str_3,
              ada__characters__handling__to_upper'access);
            E335b : boolean;

-- 392:

-- 393:          if Str_3 /=
            B329b : declare
               M336b : system__secondary_stack__mark_id :=
                 $system__secondary_stack__ss_mark;
               F334b : system__finalization_root__finalizable_ptr :=

-- 394:             To_String_8("A STRING WITH LOWER CASE LETTERS")
                 null;
               procedure
                 test_jwa_cxa4030__test_block__B_3__B329b___clean is
               begin
                  system__soft_links__abort_defer.all;
                  $system__finalization_implementation__finalize_list (
                    F334b);
                  $system__secondary_stack__ss_release (M336b);
                  system__soft_links__abort_undefer.all;
                  return;
               end test_jwa_cxa4030__test_block__B_3__B329b___clean;
            begin
               type test_jwa_cxa4030__test_block__B_3__B329b__A331b is
                 access all jwa__strings__string_8;
               freeze test_jwa_cxa4030__test_block__B_3__B329b__A331b []
               R332b : test_jwa_cxa4030__test_block__B_3__B329b__A331b :=
                 jwa__strings__create__2 (
                 "A STRING WITH LOWER CASE LETTERS")'reference;
               $system__finalization_implementation__deep_tag_attach (
                 F334b, R332b.all'address, 1);
               E335b := not (jwa__strings__Oeq (str_3, R332b.all));
            at end
               test_jwa_cxa4030__test_block__B_3__B329b___clean;
            end B329b;
            if E335b then

-- 395:          then

-- 396:             Report.Failed("Incorrect result from Procedure Translate - 6");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 6");

-- 397:          end if;
            end if;

-- 398:

-- 399:          Translate(New_Character_String, Map_To_Upper_Case_Ptr);
            jwa__strings__translate__4 (new_character_string,
              map_to_upper_case_ptr);

-- 400:

-- 401:          if New_Character_String /= TC_New_Character_String then
            if not (jwa__strings__Oeq (new_character_string,
              tc_new_character_string)) then

-- 402:             Report.Failed("Incorrect result from Procedure Translate - 6");
               report.report__failed (
                 "Incorrect result from Procedure Translate - 6");

-- 403:          end if;
            end if;
         at end
            test_jwa_cxa4030__test_block__B_3___clean;

-- 404:

-- 405:       end;
         end B_3;

-- 406:

-- 407:

-- 408:    exception
      exception

-- 409:       when others => Report.Failed ("Exception raised in Test_Block");
         when others =>
            system__soft_links__abort_undefer.all;
            report.report__failed ("Exception raised in Test_Block");

-- 410:    end Test_Block;
      end;
   at end
      test_jwa_cxa4030__test_block___clean;
   end test_block;

-- 411:

-- 412:    Report.Result;
   report.report__result;

-- 413:

-- 414: end Test_Jwa_CXA4030;
   return;
end test_jwa_cxa4030;
