diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-07-25 00:51:48 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-07-25 00:51:48 +0200 |
| commit | 597f12a8e0fca0c3e8087ab4ea4ae81e599f155f (patch) | |
| tree | 005eba6e33769840aff8bc7f4b913645ee4c25af /tests | |
| parent | 4cd60bba6df6691b916124f1ba1b6fc6f7d15496 (diff) | |
Fix issues with enums infer call expr
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 53a1da5..c4549b1 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -1840,6 +1840,40 @@ ast_index_enum_infer :: proc(t: ^testing.T) { } @(test) +ast_index_enum_infer_call_expr :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package) + + append( + &packages, + test.Package{ + pkg = "my_package", + source = `package my_package + Foo :: enum { + ONE, + TWO, + } + + call :: proc(a: Foo) {} + `, + }, + ) + + source := test.Source { + main = `package main + import "my_package" + + main :: proc() { + my_package.call(.{*}) + } + `, + packages = packages[:], + } + + test.expect_completion_details(t, &source, ".", {"ONE", "TWO"}) +} + + +@(test) ast_index_builtin_ODIN_OS :: proc(t: ^testing.T) { source := test.Source { main = `package test @@ -2230,10 +2264,5 @@ ast_implicit_bitset_value_decl_from_package :: proc(t: ^testing.T) { packages = packages[:], } - test.expect_completion_labels( - t, - &source, - ".", - {"Aa", "Ab", "Ac", "Ad"}, - ) + test.expect_completion_labels(t, &source, ".", {"Aa", "Ab", "Ac", "Ad"}) } |