diff options
| author | hachem <im@hachem.wtf> | 2026-08-31 19:58:56 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-31 19:58:56 +0200 |
| commit | 5b06b0e4b8effaacd23308d6a6b26c525e7d3af4 (patch) | |
| tree | 351155777028e604845d3dfec27d3caf3b22257f /tests/lexer_test.c | |
| parent | cbdb9073480c3e4d8a088b306c23406cf42e25c0 (diff) | |
feat: add enums and structs
Diffstat (limited to 'tests/lexer_test.c')
| -rw-r--r-- | tests/lexer_test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lexer_test.c b/tests/lexer_test.c index 7260d6c..38644d9 100644 --- a/tests/lexer_test.c +++ b/tests/lexer_test.c @@ -62,6 +62,13 @@ static void test_size_keywords(struct TestContext* context) check(context, scan_token(&lexer).type == TOKEN_QWORD); } +static void test_enum_struct_keywords(struct TestContext* context) +{ + struct Lexer lexer = create_lexer("enum struct"); + check(context, scan_token(&lexer).type == TOKEN_ENUM); + check(context, scan_token(&lexer).type == TOKEN_STRUCT); +} + static void test_line_counting(struct TestContext* context) { struct Lexer lexer = create_lexer("a\nb\nc"); @@ -89,6 +96,7 @@ void run_lexer_tests(struct TestContext* context) test_literals(context); test_keywords(context); test_size_keywords(context); + test_enum_struct_keywords(context); test_line_counting(context); test_comments(context); } |
