From 5b06b0e4b8effaacd23308d6a6b26c525e7d3af4 Mon Sep 17 00:00:00 2001 From: hachem Date: Mon, 31 Aug 2026 19:58:56 +0200 Subject: feat: add enums and structs --- tests/lexer_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/lexer_test.c') 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); } -- cgit v1.3