diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-26 19:57:16 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-26 19:57:16 +1100 |
| commit | e7b8ab905f842fd1996c6dec4f80ed0f615d5200 (patch) | |
| tree | 6e9fefcb4ec90db4714dcdc37aeda0ec69eb3a6e /tests | |
| parent | 5872154f56d21074f0e77950612bc769351094aa (diff) | |
| parent | 64d2031c8ddcb31698599cd744a183f8415413f6 (diff) | |
Merge pull request #1236 from BradLewis/feat/add-vector-completions-for-using-struct-fields
Add vector completions for using struct fields
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 3c34603..6e1eba6 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -5238,3 +5238,39 @@ ast_completion_proc_arg_default_enum_alias :: proc(t: ^testing.T) { } test.expect_completion_docs(t, &source, "", {"A", "B"}) } + +@(test) +ast_completion_struct_using_anonymous_vector_types :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + using _: [3]f32, + } + + main :: proc() { + foo: Foo + foo.{*} + } + + `, + } + test.expect_completion_docs(t, &source, "", {"r: f32", "x: f32"}) +} + +@(test) +ast_completion_struct_using_named_vector_types :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + using bar: [3]f32, + } + + main :: proc() { + foo: Foo + foo.{*} + } + + `, + } + test.expect_completion_docs(t, &source, "", {"Foo.bar: [3]f32", "r: f32", "x: f32"}) +} |