aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 20:12:19 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-17 20:41:54 -0400
commit11be114305845bb0bc2674d8c1d8324e1011256a (patch)
tree429cb3c592a811adcb335237022a13e84652cf81 /tests/hover_test.odin
parentd2af943d920f3ab63bae34189111ab5ee9b0a5cc (diff)
Add hover information for soa fields and variables
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin35
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