aboutsummaryrefslogtreecommitdiff
path: root/tests/lexer_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lexer_test.c')
-rw-r--r--tests/lexer_test.c8
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);
}