text
stringlengths
0
234
Process_Values : not null access
procedure (D : in Snapshot_Type;
N : in Definition_Type_Access)) is
Child : Helios.Schemas.Definition_Type_Access;
begin
Child := Node.Child;
while Child /= null loop
if Child.Child /= null then
Process_Snapshot (Data, Child);
elsif Child.Index > 0 then
Process_Values (Data, Child);
end if;
Child := Child.Next;
end loop;
end Iterate;
-- ------------------------------
-- Iterate over the values of the reports.
-- ------------------------------
procedure Iterate (Report : in Report_Queue_Type;
Process : not null access procedure (Data : in Snapshot_Type;
Node : in Definition_Type_Access)) is
begin
if not Report.Snapshot.Is_Null then
declare
List : constant Snapshot_Accessor := Report.Snapshot.Value;
Snapshot : Snapshot_Type_Access := List.First;
begin
while Snapshot /= null loop
Process (Snapshot.all, Snapshot.Schema);
Snapshot := Snapshot.Next;
end loop;
Function Definition: procedure Register (Op : in out Operation'Class;
Function Body: Name : String := Image (Subprogram_Name);
Disabled : Boolean := False;
Parallelize : Boolean := True) is
begin
null;
end Register;
pragma Unreferenced (Register);
function Num_Total_Tests (Self : Gather) return Integer is
use all type Ada.Containers.Count_Type;
begin
return Integer(Self.Parallel_Tests.Length + Self.Sequential_Tests.Length);
end Num_Total_Tests;
overriding
procedure Register (Self : in out Gather;
Name : String := Image (Subprogram_Name);
Disabled : Boolean := False;
Parallelize : Boolean := True) is
package ASU renames Ada.Strings.Unbounded;
begin
-- TODO: Test filter to go here.
if Disabled then
raise Test_Registered;
end if;
Self.Current_Name := ASU.To_Unbounded_String(Name);
if Parallelize then
Self.Parallel_Tests.Append(Self.Current_Test);
Ada.Text_IO.Put_Line ("// PARALLEL // " & ASU.To_String(Self.Current_Name));
else
Self.Sequential_Tests.Append(Self.Current_Test);
Ada.Text_IO.Put_Line ("--SEQUENTIAL-- " & ASU.To_String(Self.Current_Name));
end if;
raise Test_Registered;
end Register;
overriding
procedure Register (T : in out List;
Name : String := Image (Subprogram_Name);
Disabled : Boolean := False;
Parallelize : Boolean := True) is
begin
pragma Unreferenced (T, Disabled, Parallelize);
Ada.Text_IO.Put_Line (Name);
end Register;
overriding
procedure Register (T : in out Test;
Name : String := Image (Subprogram_Name);
Disabled : Boolean := False;
Parallelize : Boolean := True) is
begin
pragma Unreferenced(Parallelize);
T.Name := Ada.Strings.Unbounded.To_Unbounded_String (Name);
if Disabled then
raise Test_Disabled;
end if;
end Register;
procedure Report_Failure (Op : in out Operation'Class;
Message : String;