29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Test_Preallocate (Report);
Test_Query (Report);
Test_Query_Null (Report);
Test_Reset (Report);
Test_Reverse_Append (Report);
Test_Invert (Report);
Test_Empty_Append (Report);
end All_Tests;
----------------------
-- Individual Tests --
----------------------
|
>
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Test_Preallocate (Report);
Test_Query (Report);
Test_Query_Null (Report);
Test_Reset (Report);
Test_Reverse_Append (Report);
Test_Invert (Report);
Test_Empty_Append (Report);
Test_Stream_Interface (Report);
end All_Tests;
----------------------
-- Individual Tests --
----------------------
|
460
461
462
463
464
465
466
467
|
Buffer.Append (Null_Atom);
Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Empty_Append;
end Natools.S_Expressions.Atom_Buffers.Tests;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
|
Buffer.Append (Null_Atom);
Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Empty_Append;
procedure Test_Stream_Interface (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Stream interface");
begin
declare
Buffer : Atom_Buffer;
Part_1 : constant Atom := To_Atom ("0123456789");
Part_2 : constant Atom := To_Atom ("ABCDEF");
Data : Atom (1 .. 10);
Last : Offset;
begin
Buffer.Write (Part_1 & Part_2);
Buffer.Read (Data, Last);
Test_Tools.Test_Atom (Test, Part_1, Data);
Test_Tools.Test_Atom (Test, Part_2, Buffer.Data);
Buffer.Read (Data, Last);
Test_Tools.Test_Atom (Test, Part_2, Data (Data'First .. Last));
Test_Tools.Test_Atom (Test, Null_Atom, Buffer.Data);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Test_Stream_Interface;
end Natools.S_Expressions.Atom_Buffers.Tests;
|