Skip to content

Commit e45705e

Browse files
committed
TextParser - test of hexadecimal literal.
1 parent da26e2b commit e45705e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/System.Linq.Dynamic.Core.Tests/TextParserTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ public void TextParser_Parse_GreaterThanEqual()
103103
Check.That(textParser.CurrentToken.Text).Equals(">=");
104104
}
105105

106+
[Fact]
107+
public void TextParser_Parse_HexadecimalIntegerLiteral()
108+
{
109+
// Assign + Act
110+
var textParser = new TextParser(" 0x1234567890AbCdEfL ");
111+
112+
// Assert
113+
Check.That(textParser.CurrentToken.Id).Equals(TokenId.IntegerLiteral);
114+
Check.That(textParser.CurrentToken.Pos).Equals(1);
115+
Check.That(textParser.CurrentToken.Text).Equals("0x1234567890AbCdEfL");
116+
}
117+
106118
[Fact]
107119
public void TextParser_Parse_LessGreater()
108120
{

0 commit comments

Comments
 (0)