aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-04-29 23:48:07 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2021-04-29 23:48:07 +0200
commit881de49df4dafb143b39afa5b5f012d98d8a7e7b (patch)
tree85d39e6dd2a8838d4db647c35366ebe9a79cd9f7 /tests
parentef23ff512b31adf1e4a8519d1a2b9a713e1499dc (diff)
new test + fixed for range bug
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 64fe05b..2f6bb66 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -195,7 +195,7 @@ ast_completion_identifier_proc_group :: proc(t: ^testing.T) {
source_packages = {},
};
- test.expect_completion_details(t, &source, "", {"group_function"});
+ test.expect_completion_details(t, &source, "", {"test.group_function: proc"});
}
@(test)
@@ -222,4 +222,27 @@ index_completion_in_comp_lit_type :: proc(t: ^testing.T) {
//test.expect_completion_details(t, &source, "", {"My_Struct: struct"});
}
+@(test)
+index_completion_range_struct_selector_strings :: proc(t: ^testing.T) {
+
+ source := test.Source {
+ main = `package test
+
+ My_Struct :: struct {
+ array: []string,
+ }
+
+ main :: proc() {
+ my_struct: My_Struct;
+
+ for value in my_struct.array {
+ val*
+ }
+ }
+ `,
+ source_packages = {},
+ };
+
+ test.expect_completion_details(t, &source, "", {"test.value: string"});
+}