27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
Test_Block_Append (Report);
Test_Octet_Append (Report);
Test_Preallocate (Report);
Test_Query (Report);
Test_Query_Null (Report);
Test_Reset (Report);
Test_Reverse_Append (Report);
end All_Tests;
----------------------
-- Individual Tests --
----------------------
|
>
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
Test_Block_Append (Report);
Test_Octet_Append (Report);
Test_Preallocate (Report);
Test_Query (Report);
Test_Query_Null (Report);
Test_Reset (Report);
Test_Reverse_Append (Report);
Test_Invert (Report);
end All_Tests;
----------------------
-- Individual Tests --
----------------------
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
Test_Tools.Test_Atom (Report, Name, Data, Buffer.Data);
end;
exception
when Error : others => Report.Report_Exception (Name, Error);
end Test_Block_Append;
procedure Test_Octet_Append (Report : in out NT.Reporter'Class) is
Name : constant String := "Append octet by octet";
Data : Atom (0 .. 255);
begin
for O in Octet loop
Data (Count (O)) := O;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
Test_Tools.Test_Atom (Report, Name, Data, Buffer.Data);
end;
exception
when Error : others => Report.Report_Exception (Name, Error);
end Test_Block_Append;
procedure Test_Invert (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Invert procedure");
Source : Atom (1 .. 10);
Inverse : Atom (1 .. 10);
begin
for I in Source'Range loop
Source (I) := 10 + Octet (I);
Inverse (11 - I) := Source (I);
end loop;
declare
Buffer : Atom_Buffer;
begin
Buffer.Invert;
Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data);
Buffer.Append (Source (1 .. 1));
Buffer.Invert;
Test_Tools.Test_Atom (Test, Source (1 .. 1), Buffer.Data);
Buffer.Append (Source (2 .. 7));
Buffer.Invert;
Test_Tools.Test_Atom (Test, Inverse (4 .. 10), Buffer.Data);
Buffer.Invert;
Buffer.Append (Source (8 .. 10));
Buffer.Invert;
Test_Tools.Test_Atom (Test, Inverse, Buffer.Data);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Invert;
procedure Test_Octet_Append (Report : in out NT.Reporter'Class) is
Name : constant String := "Append octet by octet";
Data : Atom (0 .. 255);
begin
for O in Octet loop
Data (Count (O)) := O;
|