aboutsummaryrefslogtreecommitdiff
path: root/tests/hover_test.odin
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hover_test.odin')
-rw-r--r--tests/hover_test.odin28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 8d5f461..282ffb7 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5675,6 +5675,34 @@ ast_hover_unary_overload_function_call :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.bar: int")
}
+
+@(test)
+ast_hover_negate_function_call :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc() -> bool {}
+
+ main :: proc() {
+ b{*}ar := !foo()
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: bool")
+}
+
+@(test)
+ast_hover_function_call_with_parens :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ foo :: proc() -> bool {}
+
+ main :: proc() {
+ b{*}ar := (foo())
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.bar: bool")
+}
/*
Waiting for odin fix