From ab48847797761e0fec0f2c49b8576a646ca3acaa Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 20 Jan 2019 16:49:44 +1100 Subject: All lexer functions should be functional now --- test/ratnest-tests.adb | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'test') 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); -- cgit