17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
+
+
|
with System.Storage_Pools;
with GNAT.Debug_Pools;
with Natools.S_Expressions.Atom_Buffers;
with Natools.S_Expressions.Caches;
with Natools.S_Expressions.Generic_Caches;
with Natools.S_Expressions.Lockable.Tests;
with Natools.S_Expressions.Parsers;
with Natools.S_Expressions.Printers;
with Natools.S_Expressions.Test_Tools;
package body Natools.S_Expressions.Cache_Tests is
Pool : GNAT.Debug_Pools.Debug_Pool;
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
+
|
-------------------------
procedure All_Tests (Report : in out NT.Reporter'Class) is
begin
Default_Instantiation (Report);
Debug_Instantiation (Report);
Descriptor_Interface (Report);
Lockable_Interface (Report);
end All_Tests;
-----------------------
-- Inidividual Tests --
-----------------------
|
303
304
305
306
307
308
309
310
|
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Test_Tools.Next_And_Check (Test, First, Events.End_Of_Input, 0);
Test_Tools.Next_And_Check (Test, Second, Events.End_Of_Input, 0);
end;
exception
when Error : others => Test.Report_Exception (Error);
end Descriptor_Interface;
procedure Lockable_Interface (Report : in out NT.Reporter'Class) is
Test : NT.Test := Report.Item ("Lockable.Descriptor insterface");
begin
declare
Cache : Caches.Reference;
begin
declare
Input : aliased Test_Tools.Memory_Stream;
Parser : aliased Parsers.Parser;
Subparser : Parsers.Subparser (Parser'Access, Input'Access);
begin
Input.Set_Data (Lockable.Tests.Test_Expression);
Test_Tools.Next_And_Check (Test, Subparser, Events.Open_List, 1);
Printers.Transfer (Subparser, Cache);
end;
declare
Cursor : Caches.Cursor := Cache.First;
begin
Lockable.Tests.Test_Interface (Test, Cursor);
end;
end;
exception
when Error : others => Test.Report_Exception (Error);
end Lockable_Interface;
end Natools.S_Expressions.Cache_Tests;
|