diff options
| author | hachem <im@hachem.wtf> | 2026-08-30 22:42:20 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-30 22:42:20 +0200 |
| commit | 81799f3e41ad9cab305930b7743a752003ff16ec (patch) | |
| tree | 20fd67914ac143ab97a00392abcf5817ba11db22 /tests/lexer_test.c | |
| parent | 294777178f9203283364f3e672569becb4dd1e7c (diff) | |
feat: sized memory stores bia ^
Diffstat (limited to 'tests/lexer_test.c')
| -rw-r--r-- | tests/lexer_test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lexer_test.c b/tests/lexer_test.c index 11b15b9..f677793 100644 --- a/tests/lexer_test.c +++ b/tests/lexer_test.c @@ -45,6 +45,15 @@ static void test_keywords(struct TestContext* context) check(context, scan_token(&lexer).type == TOKEN_IDENTIFIER); } +static void test_size_keywords(struct TestContext* context) +{ + struct Lexer lexer = create_lexer("byte word dword qword"); + check(context, scan_token(&lexer).type == TOKEN_BYTE); + check(context, scan_token(&lexer).type == TOKEN_WORD); + check(context, scan_token(&lexer).type == TOKEN_DWORD); + check(context, scan_token(&lexer).type == TOKEN_QWORD); +} + static void test_line_counting(struct TestContext* context) { struct Lexer lexer = create_lexer("a\nb\nc"); @@ -70,6 +79,7 @@ void run_lexer_tests(struct TestContext* context) test_operators(context); test_literals(context); test_keywords(context); + test_size_keywords(context); test_line_counting(context); test_comments(context); } |
