diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 20:12:19 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 20:41:54 -0400 |
| commit | 11be114305845bb0bc2674d8c1d8324e1011256a (patch) | |
| tree | 429cb3c592a811adcb335237022a13e84652cf81 /tests/hover_test.odin | |
| parent | d2af943d920f3ab63bae34189111ab5ee9b0a5cc (diff) | |
Add hover information for soa fields and variables
Diffstat (limited to 'tests/hover_test.odin')
| -rw-r--r-- | tests/hover_test.odin | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin index 6427c34..7201c8d 100644 --- a/tests/hover_test.odin +++ b/tests/hover_test.odin @@ -4148,7 +4148,7 @@ ast_hover_soa_slice :: proc(t: ^testing.T) { } @(test) -ast_hover_soa_struct_field :: proc(t: ^testing.T) { +ast_hover_struct_with_soa_field :: proc(t: ^testing.T) { source := test.Source { main = `package test Foo :: struct { @@ -4163,6 +4163,39 @@ ast_hover_soa_struct_field :: proc(t: ^testing.T) { test.expect_hover(t, &source, "test.Bar: struct {\n\tfoos: #soa[5]Foo,\n}") } +@(test) +ast_hover_soa_slice_field :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + x, y: int, + } + + main :: proc() { + foos: #soa[]Foo + foos.x{*} + } + `, + } + test.expect_hover(t, &source, "foos.x: [^]int") +} + +@(test) +ast_hover_identifier_soa_slice_field :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Foo :: struct { + x, y: int, + } + + main :: proc() { + foos: #soa[]Foo + x{*} := foos.x + } + `, + } + test.expect_hover(t, &source, "test.x: [^]int") +} /* Waiting for odin fix |