aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-30 05:08:45 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-30 05:08:45 -0400
commit8e434d13a3cad539fdeb0352bf9f386928dfb00f (patch)
treed7a8c0e571e527f5d2b8c752d9feea4cc1c776ae /tests/hover_test.odin
parent98b1ebda9888e4527db9432c37274244fdd5e6ae (diff)
Update local consts hover info to behave like global consts
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 4a99d19..1ee56d4 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -2930,7 +2930,7 @@ ast_hover_builtin_max_mix_const :: proc(t: ^testing.T) {
}
`,
}
- test.expect_hover(t, &source, "test.m :: 4.6")
+ test.expect_hover(t, &source, "test.m :: max(1, 2.0, 3, 4.6)")
}
@(test)
@@ -5368,6 +5368,32 @@ ast_hover_parapoly_other_package :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "my_package.bar :: proc(_: $T)\n Docs!\n\n// Comment!")
}
+
+@(test)
+ast_hover_local_const_binary_expr :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ f{*}oo :: 1 + 2
+ }
+
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo :: 1 + 2")
+}
+
+@(test)
+ast_hover_local_const_binary_expr_with_type :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ f{*}oo : i32 : 1 + 2
+ }
+
+ `,
+ }
+ test.expect_hover(t, &source, "test.foo : i32 : 1 + 2")
+}
/*
Waiting for odin fix