summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-14 04:09:02 -0500
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-12-14 04:09:02 -0500
commite9f9961537d7818e7a512f8dc43f6483c607b1a0 (patch)
tree58ea2b12072c838580154996383ab90b54324ad9 /tests
parentd13ea9fadb3522b57184daeaa94272003202da6a (diff)
Add hover info for variables from local call directives
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 75b3341..51a2edc 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5894,6 +5894,42 @@ ast_hover_const_aliases_from_other_pkg :: proc(t: ^testing.T) {
test.expect_hover(t, &source, "test.Bar :: my_package.Foo")
}
+@(test)
+ast_hover_directives_config_local :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc() {
+ b{*}ar := #config(TEST, false)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: bool")
+}
+
+@(test)
+ast_hover_directives_load_type_local :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc() {
+ b{*}ar := #load("foo", string)
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: string")
+}
+
+@(test)
+ast_hover_directives_load_hash_local :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ foo :: proc() {
+ b{*}ar := #load_hash("a", "b")
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: int")
+}
/*
Waiting for odin fix