diff options
Diffstat (limited to 'tests/sema_test.c')
| -rw-r--r-- | tests/sema_test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/sema_test.c b/tests/sema_test.c index dc01d47..643ffdf 100644 --- a/tests/sema_test.c +++ b/tests/sema_test.c @@ -97,6 +97,13 @@ static void test_deref_needs_register(struct TestContext* context) check(context, analyze_source("proc main\n{\nrax = ^rsi\n}\n")); } +static void test_signed_load_needs_size(struct TestContext* context) +{ + check(context, analyze_source("proc main\n{\nrax = ^signed byte rsi\n}\n")); + check(context, !analyze_source("proc main\n{\nrax = ^signed rsi\n}\n")); + check(context, !analyze_source("proc main\n{\nrax = ^signed qword rsi\n}\n")); +} + static void test_stack_size_constant(struct TestContext* context) { check(context, analyze_source( @@ -152,6 +159,7 @@ void run_sema_tests(struct TestContext* context) test_const_expr_rejects_register(context); test_const_expr_rejects_data(context); test_deref_needs_register(context); + test_signed_load_needs_size(context); test_stack_size_constant(context); test_enum_struct_members(context); test_references_resolve(context); |
