diff options
author | Jed Barber <jjbarber@y7mail.com> | 2019-01-20 16:49:44 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2019-01-20 16:49:44 +1100 |
commit | ab48847797761e0fec0f2c49b8576a646ca3acaa (patch) | |
tree | 5c1a2d0cc8224e83456b95bbea5c1a115e042375 /test | |
parent | 26cb20d3cf5d6148f2e2baa603a0c61a87642f3a (diff) |
All lexer functions should be functional now
Diffstat (limited to 'test')
-rw-r--r-- | test/ratnest-tests.adb | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/test/ratnest-tests.adb b/test/ratnest-tests.adb index d5c150e..3d51081 100644 --- a/test/ratnest-tests.adb +++ b/test/ratnest-tests.adb @@ -6,7 +6,7 @@ with Ada.Strings.Maps, Ada.Exceptions, Packrat.Lexer.Debug, - Packrat.Util, Ada.Text_IO; + Packrat.Util; package body Ratnest.Tests is @@ -907,12 +907,6 @@ package body Ratnest.Tests is My_Scan ("", Test_Context); begin if Actual_Result1 /= Intended_Result1 or Actual_Result2 /= Intended_Result2 then - for T of Actual_Result1 loop - Ada.Text_IO.Put_Line (T.Debug_String); - end loop; - for T of Actual_Result2 loop - Ada.Text_IO.Put_Line (T.Debug_String); - end loop; return Fail; end if; return Pass; @@ -952,7 +946,7 @@ package body Ratnest.Tests is begin if Sentinel > 1 then Sentinel := 1; - return "it will happen again "; + return "it will happen again"; elsif Sentinel > 0 then Sentinel := 0; return " and again and again"; @@ -970,11 +964,11 @@ package body Ratnest.Tests is (1 => Word_Tokens.Create (Word, 1, 2, "it"), 2 => Word_Tokens.Create (Word, 4, 7, "will"), 3 => Word_Tokens.Create (Word, 9, 14, "happen"), - 4 => Word_Tokens.Create (Word, 16, 20, "again"), - 5 => Word_Tokens.Create (Word, 22, 24, "and"), - 6 => Word_Tokens.Create (Word, 26, 30, "again"), - 7 => Word_Tokens.Create (Word, 32, 34, "and"), - 8 => Word_Tokens.Create (Word, 36, 40, "again")); + 4 => Word_Tokens.Create (Word, 17, 21, "again"), + 5 => Word_Tokens.Create (Word, 23, 25, "and"), + 6 => Word_Tokens.Create (Word, 27, 31, "again"), + 7 => Word_Tokens.Create (Word, 33, 35, "and"), + 8 => Word_Tokens.Create (Word, 37, 41, "again")); Actual_Result : Word_Tokens.Token_Array := My_Scan (More_Input'Unrestricted_Access, Test_Context); |