Skip to content

Commit

Permalink
char lexeme unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Nov 20, 2019
1 parent 2183027 commit baf3adf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ParserTests/lexer/GenericLexerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,15 @@ public void TestCharTokens()
Assert.False(res2.IsError);
Assert.Equal(2, res2.Tokens.Count);
token = res2.Tokens[0];
Assert.Equal(source, token.Value); // TODO ?
Assert.Equal(source, token.Value);
Assert.Equal(CharTokens.MyChar, token.TokenID);

var sourceU = "'\\u0066'";
var res3 = lexer.Tokenize(sourceU);
Assert.False(res3.IsError);
Assert.Equal(2, res3.Tokens.Count);
token = res3.Tokens[0];
Assert.Equal(sourceU, token.Value);
Assert.Equal(CharTokens.MyChar, token.TokenID);
}

Expand Down

0 comments on commit baf3adf

Please sign in to comment.