aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-10-30 05:12:27 -0400
committerGitHub <noreply@github.com>2025-10-30 05:12:27 -0400
commita6357c1cd8085774765d2618e5a34aaf163d560e (patch)
treed7a8c0e571e527f5d2b8c752d9feea4cc1c776ae /tests
parent98b1ebda9888e4527db9432c37274244fdd5e6ae (diff)
parent8e434d13a3cad539fdeb0352bf9f386928dfb00f (diff)
Merge pull request #1136 from BradLewis/feat/hover-local-consts-like-globals
Update local consts hover info to behave like global consts
Diffstat (limited to 'tests')
-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