From ea022446ea40844831a7daa3c6e6d9f7d91c01f2 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 13 Jan 2021 18:57:43 +1100 Subject: Removed superfluous Line_End/Input_End lexer combinators --- test/rat_tests-lexers.adb | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'test/rat_tests-lexers.adb') diff --git a/test/rat_tests-lexers.adb b/test/rat_tests-lexers.adb index 15a5d6f..6d8c34f 100644 --- a/test/rat_tests-lexers.adb +++ b/test/rat_tests-lexers.adb @@ -480,53 +480,6 @@ package body Rat_Tests.Lexers is end Take_Until_Check; - function Line_End_Check - return Test_Result - is - function LF_End is new Slexy.Line_End (Latin.LF); - function C_End is new Slexy.Line_End ('c'); - - Test_Str : String := "abcd" & Latin.LF & "e"; - - Result1 : Slexy.Combinator_Result := - Slebug.Create_Result (5, Packrat.Success); - Result2 : Slexy.Combinator_Result := - Slebug.Create_Result (3, Packrat.Success); - Result3 : Slexy.Combinator_Result := Slebug.Empty_Fail; - begin - if LF_End (Test_Str, 5) /= Result1 or C_End (Test_Str, 3) /= Result2 or - LF_End (Test_Str, Test_Str'Last + 5) /= Result3 or LF_End (Test_Str, 1) /= Result3 - then - return Fail; - end if; - return Pass; - end Line_End_Check; - - - function Input_End_Check - return Test_Result - is - function C_End is new Slexy.Input_End ('c'); - function E_End is new Slexy.Input_End ('e'); - - Test_Str : String := "abcde"; - - Result1 : Slexy.Combinator_Result := - Slebug.Create_Result (5, Packrat.Success); - Result2 : Slexy.Combinator_Result := - Slebug.Create_Result (3, Packrat.Success); - Result3 : Slexy.Combinator_Result := Slebug.Empty_Fail; - begin - if C_End (Test_Str, 3) /= Result2 or E_End (Test_Str, 5) /= Result1 or - C_End (Test_Str, 6) /= Result3 or E_End (Test_Str, 6) /= Result3 or - C_End (Test_Str, 1) /= Result3 or E_End (Test_Str, Test_Str'Last + 5) /= Result3 - then - return Fail; - end if; - return Pass; - end Input_End_Check; - - -- cgit