Skip to content

Commit

Permalink
fix: Scanner tests
Browse files Browse the repository at this point in the history
  • Loading branch information
can-keklik committed Jul 12, 2024
1 parent 1560a8a commit 97a72a0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lykiadb-server/src/lang/tokenizer/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,12 @@ mod test {
#[test]
fn test_identifiers() {
assert_tokens(
"$myPreciseVariable $my_precise_variable myPreciseFunction my_precise_function \\for \\$edge_case",
"$myCustomVariable $my_custom_variable myCustomFunction my_custom_function \\for \\$edge_case",
vec![
Token {
tok_type: TokenType::Identifier { dollar: true },
literal: Some(Str(Arc::new("$myPreciseVariable".to_string()))),
lexeme: lexm!("$myPreciseVariable"),
literal: Some(Str(Arc::new("$myCustomVariable".to_string()))),
lexeme: lexm!("$myCustomVariable"),
span: Span {
line: 0,
start: 0,
Expand All @@ -647,8 +647,8 @@ mod test {
},
Token {
tok_type: TokenType::Identifier { dollar: true },
literal: Some(Str(Arc::new("$my_precise_variable".to_string()))),
lexeme: lexm!("$my_precise_variable"),
literal: Some(Str(Arc::new("$my_custom_variable".to_string()))),
lexeme: lexm!("$my_custom_variable"),
span: Span {
line: 0,
start: 19,
Expand All @@ -658,8 +658,8 @@ mod test {
},
Token {
tok_type: TokenType::Identifier { dollar: false },
literal: Some(Str(Arc::new("myPreciseFunction".to_string()))),
lexeme: lexm!("myPreciseFunction"),
literal: Some(Str(Arc::new("myCustomFunction".to_string()))),
lexeme: lexm!("myCustomFunction"),
span: Span {
line: 0,
start: 40,
Expand All @@ -669,8 +669,8 @@ mod test {
},
Token {
tok_type: TokenType::Identifier { dollar: false },
literal: Some(Str(Arc::new("my_precise_function".to_string()))),
lexeme: lexm!("my_precise_function"),
literal: Some(Str(Arc::new("my_custom_function".to_string()))),
lexeme: lexm!("my_custom_function"),
span: Span {
line: 0,
start: 58,
Expand Down

0 comments on commit 97a72a0

Please sign in to comment.