summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-10 00:11:30 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-10 00:11:30 +1100
commit7009e51c15ed51d716102540d5914e3d14a8a128 (patch)
tree6a271a11429758c4364e79a9d7b42a6feca44f8e /test
parent81f7e19f212f9d1ac75e04e62933e6c918219cfc (diff)
Debug_String functions added to Packrat.Errors and Packrat.Tokens
Diffstat (limited to 'test')
-rw-r--r--test/test_main.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_main.adb b/test/test_main.adb
index 404e690..a2682f4 100644
--- a/test/test_main.adb
+++ b/test/test_main.adb
@@ -3,6 +3,7 @@
with
Ada.Text_IO,
+ Packrat,
Ratnest.Tests;
use
@@ -13,14 +14,25 @@ use
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...");