aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2024-11-17 13:48:59 +0100
committerDanielGavin <danielgavin5@hotmail.com>2024-11-17 13:48:59 +0100
commitc5d22e5e4a703f8e19770862cf4c52a4140bf801 (patch)
tree2acfcfbf158cc81c59cbde297661ebf483fad843 /tests
parentcfe49c86af90dc4ce7d1e78bec82961521ad29af (diff)
Add support for call expression "range" loops with custom iterators and non
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index f25fba5..e523592 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -655,6 +655,31 @@ ast_for_in_identifier_completion :: proc(t: ^testing.T) {
}
@(test)
+ast_for_in_call_expr_completion :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+ Step :: struct {
+ data: int,
+ }
+
+ main :: proc() {
+ list :: proc() -> []Step {
+ return nil
+ }
+ for zstep in list() {
+ zst{*}
+ }
+ }
+ `,
+ packages = {},
+ }
+
+
+ test.expect_completion_details(t, &source, ".", {"test.zstep: Step"})
+}
+
+
+@(test)
ast_completion_poly_struct_proc :: proc(t: ^testing.T) {
source := test.Source {
main = `package test