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, 27 insertions, 1 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 345e9f9..d0b844e 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -5033,7 +5033,6 @@ ast_hover_proc_overload_basic_type_alias :: proc(t: ^testing.T) {
ast_hover_proc_overload_nil_pointer :: proc(t: ^testing.T) {
source := test.Source {
main = `package test
- import "my_package"
foo_int :: proc(i: int) {}
foo_ptr :: proc(s: ^string) {}
@@ -5086,6 +5085,33 @@ ast_hover_package_proc_naming_conflicting_with_another_package :: proc(t: ^testi
test.expect_hover(t, &source, "my_package.foo :: proc()")
}
+
+@(test)
+ast_hover_matrix_index :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ foo: matrix[3, 2]f32
+ a{*} := foo[0]
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.a: [3]f32")
+}
+
+@(test)
+ast_hover_matrix_index_twice :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ main :: proc() {
+ foo: matrix[2, 3]f32
+ a := foo[0]
+ b{*} := a[0]
+ }
+ `,
+ }
+ test.expect_hover(t, &source, "test.b: f32")
+}
/*
Waiting for odin fix