Commit f7f4a60
committed
test: add lexer unit tests for parser/lexer.cpp
- Add 54 unit tests covering Lexer class:
- Basic tokenization (SELECT, identifiers, numbers, strings)
- Keywords case insensitivity
- Operators (=, <>, <, <=, >, >=, +, -, *, /)
- Delimiters (parentheses, comma, semicolon, dot)
- Whitespace and newline handling
- SQL comments (-- style)
- Position tracking (line/column)
- peek_token() behavior
- Error handling (unterminated strings, invalid chars)
- Complex SQL statements (CREATE TABLE, INSERT, UPDATE, DELETE, JOIN)1 parent 615fa1c commit f7f4a60
2 files changed
Lines changed: 536 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
0 commit comments