-- CXA4014.A
|
-- CXA4014.A
|
--
|
--
|
-- Grant of Unlimited Rights
|
-- Grant of Unlimited Rights
|
--
|
--
|
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
|
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
|
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
|
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
|
-- unlimited rights in the software and documentation contained herein.
|
-- unlimited rights in the software and documentation contained herein.
|
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
|
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
|
-- this public release, the Government intends to confer upon all
|
-- this public release, the Government intends to confer upon all
|
-- recipients unlimited rights equal to those held by the Government.
|
-- recipients unlimited rights equal to those held by the Government.
|
-- These rights include rights to use, duplicate, release or disclose the
|
-- These rights include rights to use, duplicate, release or disclose the
|
-- released technical data and computer software in whole or in part, in
|
-- released technical data and computer software in whole or in part, in
|
-- any manner and for any purpose whatsoever, and to have or permit others
|
-- any manner and for any purpose whatsoever, and to have or permit others
|
-- to do so.
|
-- to do so.
|
--
|
--
|
-- DISCLAIMER
|
-- DISCLAIMER
|
--
|
--
|
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
|
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
|
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
|
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
|
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
|
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
|
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
|
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
|
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
|
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
|
-- PARTICULAR PURPOSE OF SAID MATERIAL.
|
-- PARTICULAR PURPOSE OF SAID MATERIAL.
|
--*
|
--*
|
--
|
--
|
-- OBJECTIVE:
|
-- OBJECTIVE:
|
-- Check that the subprograms defined in package Ada.Strings.Wide_Fixed
|
-- Check that the subprograms defined in package Ada.Strings.Wide_Fixed
|
-- are available, and that they produce correct results. Specifically,
|
-- are available, and that they produce correct results. Specifically,
|
-- check the subprograms Find_Token, Head, Index, Index_Non_Blank, Move,
|
-- check the subprograms Find_Token, Head, Index, Index_Non_Blank, Move,
|
-- Overwrite, and Replace_Slice, Tail, and Translate.
|
-- Overwrite, and Replace_Slice, Tail, and Translate.
|
-- Use the access-to-subprogram mapping version of Translate (function
|
-- Use the access-to-subprogram mapping version of Translate (function
|
-- and procedure).
|
-- and procedure).
|
--
|
--
|
-- TEST DESCRIPTION:
|
-- TEST DESCRIPTION:
|
-- This test demonstrates how certain wide fixed string operations could
|
-- This test demonstrates how certain wide fixed string operations could
|
-- be used in wide string information processing. A procedure is defined
|
-- be used in wide string information processing. A procedure is defined
|
-- that will extract portions of a 50 character string that correspond to
|
-- that will extract portions of a 50 character string that correspond to
|
-- certain data items (i.e., name, address, state, zip code). These
|
-- certain data items (i.e., name, address, state, zip code). These
|
-- parsed items will then be added to the appropriate fields of data
|
-- parsed items will then be added to the appropriate fields of data
|
-- base elements. These data base elements are then compared for
|
-- base elements. These data base elements are then compared for
|
-- accuracy against a similar set of predefined data base
|
-- accuracy against a similar set of predefined data base
|
-- elements.
|
-- elements.
|
-- A variety of wide fixed string processing subprograms are used in this
|
-- A variety of wide fixed string processing subprograms are used in this
|
-- test. Each parsing operation attempts to use a different combination
|
-- test. Each parsing operation attempts to use a different combination
|
-- of the available subprograms to accomplish the same goal, therefore
|
-- of the available subprograms to accomplish the same goal, therefore
|
-- continuity of approach to wide string parsing is not seen in this
|
-- continuity of approach to wide string parsing is not seen in this
|
-- test.
|
-- test.
|
-- However, a wide variety of possible approaches are demonstrated, while
|
-- However, a wide variety of possible approaches are demonstrated, while
|
-- exercising a large number of the total predefined subprograms of
|
-- exercising a large number of the total predefined subprograms of
|
-- package Ada.Strings.Wide_Fixed.
|
-- package Ada.Strings.Wide_Fixed.
|
--
|
--
|
--
|
--
|
-- CHANGE HISTORY:
|
-- CHANGE HISTORY:
|
-- 06 Dec 94 SAIC ACVC 2.0
|
-- 06 Dec 94 SAIC ACVC 2.0
|
-- 02 Nov 95 SAIC Update and repair for ACVC 2.0.1.
|
-- 02 Nov 95 SAIC Update and repair for ACVC 2.0.1.
|
--
|
--
|
--!
|
--!
|
|
|
package CXA40140 is
|
package CXA40140 is
|
|
|
UnderScore : Wide_Character := '_';
|
UnderScore : Wide_Character := '_';
|
Blank : Wide_Character := ' ';
|
Blank : Wide_Character := ' ';
|
|
|
-- Function providing a mapping to a blank Wide_Character.
|
-- Function providing a mapping to a blank Wide_Character.
|
function US_to_Blank_Map (From : Wide_Character) return Wide_Character;
|
function US_to_Blank_Map (From : Wide_Character) return Wide_Character;
|
|
|
end CXA40140;
|
end CXA40140;
|
|
|
package body CXA40140 is
|
package body CXA40140 is
|
|
|
function US_to_Blank_Map (From : Wide_Character) return Wide_Character is
|
function US_to_Blank_Map (From : Wide_Character) return Wide_Character is
|
begin
|
begin
|
if From = UnderScore then
|
if From = UnderScore then
|
return Blank;
|
return Blank;
|
else
|
else
|
return From;
|
return From;
|
end if;
|
end if;
|
end US_to_Blank_Map;
|
end US_to_Blank_Map;
|
|
|
end CXA40140;
|
end CXA40140;
|
|
|
|
|
with CXA40140;
|
with CXA40140;
|
with Ada.Strings.Wide_Fixed;
|
with Ada.Strings.Wide_Fixed;
|
with Ada.Strings.Wide_Maps;
|
with Ada.Strings.Wide_Maps;
|
with Report;
|
with Report;
|
|
|
procedure CXA4014 is
|
procedure CXA4014 is
|
use CXA40140;
|
use CXA40140;
|
begin
|
begin
|
|
|
Report.Test ("CXA4014", "Check that the subprograms defined in package " &
|
Report.Test ("CXA4014", "Check that the subprograms defined in package " &
|
"Ada.Strings.Wide_Fixed are available, and that " &
|
"Ada.Strings.Wide_Fixed are available, and that " &
|
"they produce correct results");
|
"they produce correct results");
|
|
|
Test_Block:
|
Test_Block:
|
declare
|
declare
|
|
|
Number_Of_Info_Strings : constant Natural := 3;
|
Number_Of_Info_Strings : constant Natural := 3;
|
DB_Size : constant Natural := Number_Of_Info_Strings;
|
DB_Size : constant Natural := Number_Of_Info_Strings;
|
Count : Natural := 0;
|
Count : Natural := 0;
|
Finished_Processing : Boolean := False;
|
Finished_Processing : Boolean := False;
|
Blank_Wide_String : constant Wide_String := " ";
|
Blank_Wide_String : constant Wide_String := " ";
|
|
|
subtype Info_Wide_String_Type is Wide_String (1..50);
|
subtype Info_Wide_String_Type is Wide_String (1..50);
|
type Info_Wide_String_Storage_Type is
|
type Info_Wide_String_Storage_Type is
|
array (1..Number_Of_Info_Strings) of Info_Wide_String_Type;
|
array (1..Number_Of_Info_Strings) of Info_Wide_String_Type;
|
|
|
|
|
subtype Name_Type is Wide_String (1..10);
|
subtype Name_Type is Wide_String (1..10);
|
subtype Street_Number_Type is Wide_String (1..5);
|
subtype Street_Number_Type is Wide_String (1..5);
|
subtype Street_Name_Type is Wide_String (1..10);
|
subtype Street_Name_Type is Wide_String (1..10);
|
subtype City_Type is Wide_String (1..10);
|
subtype City_Type is Wide_String (1..10);
|
subtype State_Type is Wide_String (1..2);
|
subtype State_Type is Wide_String (1..2);
|
subtype Zip_Code_Type is Wide_String (1..5);
|
subtype Zip_Code_Type is Wide_String (1..5);
|
|
|
type Data_Base_Element_Type is
|
type Data_Base_Element_Type is
|
record
|
record
|
Name : Name_Type := (others => ' ');
|
Name : Name_Type := (others => ' ');
|
Street_Number : Street_Number_Type := (others => ' ');
|
Street_Number : Street_Number_Type := (others => ' ');
|
Street_Name : Street_Name_Type := (others => ' ');
|
Street_Name : Street_Name_Type := (others => ' ');
|
City : City_Type := (others => ' ');
|
City : City_Type := (others => ' ');
|
State : State_Type := (others => ' ');
|
State : State_Type := (others => ' ');
|
Zip_Code : Zip_Code_Type := (others => ' ');
|
Zip_Code : Zip_Code_Type := (others => ' ');
|
end record;
|
end record;
|
|
|
type Data_Base_Type is array (1..DB_Size) of Data_Base_Element_Type;
|
type Data_Base_Type is array (1..DB_Size) of Data_Base_Element_Type;
|
|
|
Data_Base : Data_Base_Type;
|
Data_Base : Data_Base_Type;
|
|
|
---
|
---
|
|
|
Info_String_1 : Info_Wide_String_Type :=
|
Info_String_1 : Info_Wide_String_Type :=
|
"Joe_Jones 123 Sixth_St San_Diego CA 98765";
|
"Joe_Jones 123 Sixth_St San_Diego CA 98765";
|
|
|
Info_String_2 : Info_Wide_String_Type :=
|
Info_String_2 : Info_Wide_String_Type :=
|
"Sam_Smith 56789 S._Seventh Carlsbad CA 92177";
|
"Sam_Smith 56789 S._Seventh Carlsbad CA 92177";
|
|
|
Info_String_3 : Info_Wide_String_Type :=
|
Info_String_3 : Info_Wide_String_Type :=
|
"Jane_Brown 1219 Info_Lane Tuscon AZ 85643";
|
"Jane_Brown 1219 Info_Lane Tuscon AZ 85643";
|
|
|
|
|
Info_Strings : Info_Wide_String_Storage_Type :=
|
Info_Strings : Info_Wide_String_Storage_Type :=
|
(1 => Info_String_1,
|
(1 => Info_String_1,
|
2 => Info_String_2,
|
2 => Info_String_2,
|
3 => Info_String_3);
|
3 => Info_String_3);
|
|
|
|
|
|
|
TC_DB_Element_1 : Data_Base_Element_Type :=
|
TC_DB_Element_1 : Data_Base_Element_Type :=
|
("Joe Jones ", "123 ", "Sixth St ", "San Diego ", "CA", "98765");
|
("Joe Jones ", "123 ", "Sixth St ", "San Diego ", "CA", "98765");
|
|
|
TC_DB_Element_2 : Data_Base_Element_Type :=
|
TC_DB_Element_2 : Data_Base_Element_Type :=
|
("Sam Smith ", "56789", "S. Seventh", "Carlsbad ", "CA", "92177");
|
("Sam Smith ", "56789", "S. Seventh", "Carlsbad ", "CA", "92177");
|
|
|
TC_DB_Element_3 : Data_Base_Element_Type :=
|
TC_DB_Element_3 : Data_Base_Element_Type :=
|
("Jane Brown", "1219 ", "Info Lane ", "Tuscon ", "AZ", "85643");
|
("Jane Brown", "1219 ", "Info Lane ", "Tuscon ", "AZ", "85643");
|
|
|
TC_Data_Base : Data_Base_Type := (TC_DB_Element_1,
|
TC_Data_Base : Data_Base_Type := (TC_DB_Element_1,
|
TC_DB_Element_2,
|
TC_DB_Element_2,
|
TC_DB_Element_3);
|
TC_DB_Element_3);
|
|
|
---
|
---
|
|
|
|
|
procedure Store_Information
|
procedure Store_Information
|
(Info_String : in Info_Wide_String_Type;
|
(Info_String : in Info_Wide_String_Type;
|
DB_Record : in out Data_Base_Element_Type) is
|
DB_Record : in out Data_Base_Element_Type) is
|
|
|
package AS renames Ada.Strings;
|
package AS renames Ada.Strings;
|
use type AS.Wide_Maps.Wide_Character_Set;
|
use type AS.Wide_Maps.Wide_Character_Set;
|
|
|
Start,
|
Start,
|
Stop : Natural := 0;
|
Stop : Natural := 0;
|
|
|
Numeric_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
Numeric_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
AS.Wide_Maps.To_Set("0123456789");
|
AS.Wide_Maps.To_Set("0123456789");
|
|
|
Cal : constant
|
Cal : constant
|
AS.Wide_Maps.Wide_Character_Sequence := "CA";
|
AS.Wide_Maps.Wide_Character_Sequence := "CA";
|
California_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
California_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
AS.Wide_Maps.To_Set(Cal);
|
AS.Wide_Maps.To_Set(Cal);
|
Arizona_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
Arizona_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
AS.Wide_Maps.To_Set("AZ");
|
AS.Wide_Maps.To_Set("AZ");
|
Nevada_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
Nevada_Set : constant AS.Wide_Maps.Wide_Character_Set :=
|
AS.Wide_Maps.To_Set("NV");
|
AS.Wide_Maps.To_Set("NV");
|
|
|
Blank_Ftn_Ptr : AS.Wide_Maps.Wide_Character_Mapping_Function :=
|
Blank_Ftn_Ptr : AS.Wide_Maps.Wide_Character_Mapping_Function :=
|
US_to_Blank_Map'Access;
|
US_to_Blank_Map'Access;
|
|
|
begin
|
begin
|
|
|
-- Find the starting position of the name field (first non-blank),
|
-- Find the starting position of the name field (first non-blank),
|
-- then, from that position, find the end of the name field (first
|
-- then, from that position, find the end of the name field (first
|
-- blank).
|
-- blank).
|
|
|
Start := AS.Wide_Fixed.Index_Non_Blank(Info_String);
|
Start := AS.Wide_Fixed.Index_Non_Blank(Info_String);
|
Stop := AS.Wide_Fixed.Index (Info_String(Start..Info_String'Length),
|
Stop := AS.Wide_Fixed.Index (Info_String(Start..Info_String'Length),
|
AS.Wide_Maps.To_Set(Blank),
|
AS.Wide_Maps.To_Set(Blank),
|
AS.Inside,
|
AS.Inside,
|
AS.Forward) - 1 ;
|
AS.Forward) - 1 ;
|
|
|
-- Store the name field in the data base element field for "Name".
|
-- Store the name field in the data base element field for "Name".
|
|
|
DB_Record.Name := AS.Wide_Fixed.Head(Info_String(1..Stop),
|
DB_Record.Name := AS.Wide_Fixed.Head(Info_String(1..Stop),
|
DB_Record.Name'Length);
|
DB_Record.Name'Length);
|
|
|
-- Replace any underscore characters in the name field
|
-- Replace any underscore characters in the name field
|
-- that were used to separate first/middle/last names.
|
-- that were used to separate first/middle/last names.
|
-- Use the overloaded version of Translate that takes an
|
-- Use the overloaded version of Translate that takes an
|
-- access-to-subprogram value.
|
-- access-to-subprogram value.
|
|
|
AS.Wide_Fixed.Translate (DB_Record.Name, Blank_Ftn_Ptr);
|
AS.Wide_Fixed.Translate (DB_Record.Name, Blank_Ftn_Ptr);
|
|
|
|
|
-- Continue the extraction process; now find the position of
|
-- Continue the extraction process; now find the position of
|
-- the street number in the string.
|
-- the street number in the string.
|
|
|
Start := Stop + 1;
|
Start := Stop + 1;
|
|
|
AS.Wide_Fixed.Find_Token(Info_String(Start..Info_String'Length),
|
AS.Wide_Fixed.Find_Token(Info_String(Start..Info_String'Length),
|
Numeric_Set,
|
Numeric_Set,
|
AS.Inside,
|
AS.Inside,
|
Start,
|
Start,
|
Stop);
|
Stop);
|
|
|
-- Store the street number field in the appropriate data base
|
-- Store the street number field in the appropriate data base
|
-- element.
|
-- element.
|
-- No modification of the default parameters of procedure Move
|
-- No modification of the default parameters of procedure Move
|
-- is required.
|
-- is required.
|
|
|
AS.Wide_Fixed.Move(Source => Info_String(Start..Stop),
|
AS.Wide_Fixed.Move(Source => Info_String(Start..Stop),
|
Target => DB_Record.Street_Number);
|
Target => DB_Record.Street_Number);
|
|
|
|
|
-- Continue the extraction process; find the street name in the
|
-- Continue the extraction process; find the street name in the
|
-- info string. Skip blanks to the start of the street name, then
|
-- info string. Skip blanks to the start of the street name, then
|
-- search for the index of the next blank character in the string.
|
-- search for the index of the next blank character in the string.
|
|
|
Start := AS.Wide_Fixed.Index_Non_Blank
|
Start := AS.Wide_Fixed.Index_Non_Blank
|
(Info_String(Stop+1..Info_String'Length));
|
(Info_String(Stop+1..Info_String'Length));
|
|
|
Stop :=
|
Stop :=
|
AS.Wide_Fixed.Index(Info_String(Start..Info_String'Length),
|
AS.Wide_Fixed.Index(Info_String(Start..Info_String'Length),
|
Blank_Wide_String) - 1;
|
Blank_Wide_String) - 1;
|
|
|
-- Store the street name in the appropriate data base element field.
|
-- Store the street name in the appropriate data base element field.
|
|
|
AS.Wide_Fixed.Overwrite(DB_Record.Street_Name,
|
AS.Wide_Fixed.Overwrite(DB_Record.Street_Name,
|
1,
|
1,
|
Info_String(Start..Stop));
|
Info_String(Start..Stop));
|
|
|
-- Replace any underscore characters in the street name field
|
-- Replace any underscore characters in the street name field
|
-- that were used as word separation with blanks. Again, use the
|
-- that were used as word separation with blanks. Again, use the
|
-- access-to-subprogram value to provide the mapping.
|
-- access-to-subprogram value to provide the mapping.
|
|
|
DB_Record.Street_Name :=
|
DB_Record.Street_Name :=
|
AS.Wide_Fixed.Translate(DB_Record.Street_Name,
|
AS.Wide_Fixed.Translate(DB_Record.Street_Name,
|
Blank_Ftn_Ptr);
|
Blank_Ftn_Ptr);
|
|
|
|
|
-- Continue the extraction; remove the city name from the string.
|
-- Continue the extraction; remove the city name from the string.
|
|
|
Start := AS.Wide_Fixed.Index_Non_Blank
|
Start := AS.Wide_Fixed.Index_Non_Blank
|
(Info_String(Stop+1..Info_String'Length));
|
(Info_String(Stop+1..Info_String'Length));
|
|
|
Stop :=
|
Stop :=
|
AS.Wide_Fixed.Index(Info_String(Start..Info_String'Length),
|
AS.Wide_Fixed.Index(Info_String(Start..Info_String'Length),
|
Blank_Wide_String) - 1;
|
Blank_Wide_String) - 1;
|
|
|
-- Store the city name field in the appropriate data base element.
|
-- Store the city name field in the appropriate data base element.
|
|
|
AS.Wide_Fixed.Replace_Slice(DB_Record.City,
|
AS.Wide_Fixed.Replace_Slice(DB_Record.City,
|
1,
|
1,
|
DB_Record.City'Length,
|
DB_Record.City'Length,
|
Info_String(Start..Stop));
|
Info_String(Start..Stop));
|
|
|
-- Replace any underscore characters in the city name field
|
-- Replace any underscore characters in the city name field
|
-- that were used as word separation.
|
-- that were used as word separation.
|
|
|
AS.Wide_Fixed.Translate (DB_Record.City,
|
AS.Wide_Fixed.Translate (DB_Record.City,
|
Blank_Ftn_Ptr);
|
Blank_Ftn_Ptr);
|
|
|
|
|
-- Continue the extraction; remove the state identifier from the
|
-- Continue the extraction; remove the state identifier from the
|
-- info string.
|
-- info string.
|
|
|
Start := Stop + 1;
|
Start := Stop + 1;
|
|
|
AS.Wide_Fixed.Find_Token(Info_String(Start..Info_String'Length),
|
AS.Wide_Fixed.Find_Token(Info_String(Start..Info_String'Length),
|
AS.Wide_Maps."OR"(California_Set,
|
AS.Wide_Maps."OR"(California_Set,
|
AS.Wide_Maps."OR"(Nevada_Set,
|
AS.Wide_Maps."OR"(Nevada_Set,
|
Arizona_Set)),
|
Arizona_Set)),
|
AS.Inside,
|
AS.Inside,
|
Start,
|
Start,
|
Stop);
|
Stop);
|
|
|
-- Store the state indicator into the data base element.
|
-- Store the state indicator into the data base element.
|
|
|
AS.Wide_Fixed.Move(Source => Info_String(Start..Stop),
|
AS.Wide_Fixed.Move(Source => Info_String(Start..Stop),
|
Target => DB_Record.State,
|
Target => DB_Record.State,
|
Drop => Ada.Strings.Right,
|
Drop => Ada.Strings.Right,
|
Justify => Ada.Strings.Left,
|
Justify => Ada.Strings.Left,
|
Pad => AS.Wide_Space);
|
Pad => AS.Wide_Space);
|
|
|
|
|
-- Continue the extraction process; remove the final data item in
|
-- Continue the extraction process; remove the final data item in
|
-- the info string, the zip code, and place it into the
|
-- the info string, the zip code, and place it into the
|
-- corresponding data base element.
|
-- corresponding data base element.
|
|
|
DB_Record.Zip_Code :=
|
DB_Record.Zip_Code :=
|
AS.Wide_Fixed.Tail(Info_String, DB_Record.Zip_Code'Length);
|
AS.Wide_Fixed.Tail(Info_String, DB_Record.Zip_Code'Length);
|
|
|
exception
|
exception
|
when AS.Length_Error =>
|
when AS.Length_Error =>
|
Report.Failed ("Length_Error raised in procedure");
|
Report.Failed ("Length_Error raised in procedure");
|
when AS.Pattern_Error =>
|
when AS.Pattern_Error =>
|
Report.Failed ("Pattern_Error raised in procedure");
|
Report.Failed ("Pattern_Error raised in procedure");
|
when AS.Translation_Error =>
|
when AS.Translation_Error =>
|
Report.Failed ("Translation_Error raised in procedure");
|
Report.Failed ("Translation_Error raised in procedure");
|
when others =>
|
when others =>
|
Report.Failed ("Exception raised in procedure");
|
Report.Failed ("Exception raised in procedure");
|
end Store_Information;
|
end Store_Information;
|
|
|
|
|
begin
|
begin
|
|
|
-- Loop thru the information strings, extract the name and address
|
-- Loop thru the information strings, extract the name and address
|
-- information, place this info into elements of the data base.
|
-- information, place this info into elements of the data base.
|
|
|
while not Finished_Processing loop
|
while not Finished_Processing loop
|
|
|
Count := Count + 1;
|
Count := Count + 1;
|
|
|
Store_Information (Info_Strings(Count), Data_Base(Count));
|
Store_Information (Info_Strings(Count), Data_Base(Count));
|
|
|
Finished_Processing := (Count = Number_Of_Info_Strings);
|
Finished_Processing := (Count = Number_Of_Info_Strings);
|
|
|
end loop;
|
end loop;
|
|
|
|
|
-- Verify that the string processing was successful.
|
-- Verify that the string processing was successful.
|
|
|
for i in 1..DB_Size loop
|
for i in 1..DB_Size loop
|
if Data_Base(i) /= TC_Data_Base(i) then
|
if Data_Base(i) /= TC_Data_Base(i) then
|
Report.Failed
|
Report.Failed
|
("Data processing error on record " & Integer'Image(i));
|
("Data processing error on record " & Integer'Image(i));
|
end if;
|
end if;
|
end loop;
|
end loop;
|
|
|
|
|
exception
|
exception
|
when others => Report.Failed ("Exception raised in Test_Block");
|
when others => Report.Failed ("Exception raised in Test_Block");
|
end Test_Block;
|
end Test_Block;
|
|
|
|
|
Report.Result;
|
Report.Result;
|
|
|
end CXA4014;
|
end CXA4014;
|
|
|