Defined missing cases for lexer

This commit is contained in:
Robert Bendun 2022-05-02 19:48:14 +02:00
parent 240939c3d6
commit e32710da85

View File

@ -86,9 +86,11 @@ suite lexer_test = [] {
};
"Chord literals"_test = [] {
expect_token_type_and_value(Token::Type::Chord, "c");
expect_token_type_and_value(Token::Type::Chord, "c#");
expect_token_type_and_value(Token::Type::Chord, "c1");
expect_token_type_and_value(Token::Type::Chord, "d1257");
expect_token_type_and_value(Token::Type::Chord, "e1'");
expect_token_type_and_value(Token::Type::Chord, "e#5'");
expect_token_type_and_value(Token::Type::Chord, "g127");
expect_token_type_and_value(Token::Type::Chord, "f1'2'3'5'7'");
expect_token_type_and_value(Token::Type::Chord, "b1,2,5,7,");
@ -104,6 +106,9 @@ suite lexer_test = [] {
expect_token_type_and_value(Token::Type::Symbol, "camelCase");
expect_token_type_and_value(Token::Type::Symbol, "PascalCase");
expect_token_type_and_value(Token::Type::Symbol, "haskell'");
expect_token_type_and_value(Token::Type::Symbol, "zażółć");
expect_token_type_and_value(Token::Type::Symbol, "$foo");
expect_token_type_and_value(Token::Type::Symbol, "@bar");
};
"Operators"_test = [] {
@ -114,5 +119,8 @@ suite lexer_test = [] {
expect_token_type_and_value(Token::Type::Operator, "**");
expect_token_type_and_value(Token::Type::Operator, "=");
expect_token_type_and_value(Token::Type::Operator, "<");
expect_token_type_and_value(Token::Type::Operator, ":");
expect_token_type_and_value(Token::Type::Operator, "v");
expect_token_type_and_value(Token::Type::Operator, "%");
};
};