blob: a2682f40d05c2e326076de4a6baf9c01d96e6234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
with
Ada.Text_IO,
Packrat,
Ratnest.Tests;
use
Ada.Text_IO,
Ratnest,
Ratnest.Tests;
procedure Test_Main is
type My_Labels is (A, B, C);
package My_Tokens is new Packrat.Tokens (My_Labels, Character, String);
Err : Packrat.Errors.Error_Message := Packrat.Errors.Encode ("A", 1);
Tok : My_Tokens.Token := My_Tokens.Create (A, 1, 3, "abc");
begin
Put_Line ("Running tests for Packrat.Errors...");
Run_Tests (Error_Tests);
New_Line;
Put_Line ("Displaying Error_Message debug string output example:");
Put (Packrat.Errors.Debug_String (Err));
New_Line;
Put_Line ("Running tests for Packrat.Tokens...");
Run_Tests (Token_Tests);
New_Line;
Put_Line ("Displaying Token debug string output example:");
Put (Tok.Debug_String);
New_Line;
Put_Line ("Running tests for Packrat.Util...");
Put_Line ("Testing set predicates...");
Run_Tests (Set_Predicate_Tests);
Put_Line ("Testing ordinary predicates...");
Run_Tests (Util_Predicate_Tests);
end Test_Main;
|