From f8f6aa1f2c2893b28c73ae0e1ece3a8560bd1579 Mon Sep 17 00:00:00 2001 From: Jamess-Lucass <23193271+Jamess-Lucass@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:13:32 +0000 Subject: [PATCH] wip --- src/GoatQuery/src/Lexer/Lexer.cs | 12 ------------ src/GoatQuery/tests/Filter/FilterParserTest.cs | 2 +- src/GoatQuery/tests/Filter/FilterTest.cs | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/GoatQuery/src/Lexer/Lexer.cs b/src/GoatQuery/src/Lexer/Lexer.cs index 65b3ba3..d2dbca4 100644 --- a/src/GoatQuery/src/Lexer/Lexer.cs +++ b/src/GoatQuery/src/Lexer/Lexer.cs @@ -158,16 +158,4 @@ private string ReadString() return _input.Substring(currentPosition, _position - currentPosition); } - - private string ReadNumber() - { - var currentPosition = _position; - - while (IsDigit(_character)) - { - ReadCharacter(); - } - - return _input.Substring(currentPosition, _position - currentPosition); - } } \ No newline at end of file diff --git a/src/GoatQuery/tests/Filter/FilterParserTest.cs b/src/GoatQuery/tests/Filter/FilterParserTest.cs index df8015a..1e49ce9 100644 --- a/src/GoatQuery/tests/Filter/FilterParserTest.cs +++ b/src/GoatQuery/tests/Filter/FilterParserTest.cs @@ -45,7 +45,7 @@ public void Test_ParsingFilterStatement(string input, string expectedLeft, strin [InlineData("id contains 10")] [InlineData("id contaiins '10'")] [InlineData("id eq John'")] - public void Test_ParsingInvalidFilterThrowsException(string input) + public void Test_ParsingInvalidFilterReturnsError(string input) { var lexer = new QueryLexer(input); var parser = new QueryParser(lexer); diff --git a/src/GoatQuery/tests/Filter/FilterTest.cs b/src/GoatQuery/tests/Filter/FilterTest.cs index 3380f56..8e2d2c0 100644 --- a/src/GoatQuery/tests/Filter/FilterTest.cs +++ b/src/GoatQuery/tests/Filter/FilterTest.cs @@ -221,7 +221,7 @@ public void Test_Filter(string filter, IEnumerable expected) [Theory] [InlineData("NonExistentProperty eq 'John'")] - public void Test_InvalidFilterThrowsException(string filter) + public void Test_InvalidFilterReturnsError(string filter) { var query = new Query {