diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-11-02 17:06:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-02 17:06:09 -0500 |
| commit | ff012d06212e524aee21933b484df1d3c4e5e1e2 (patch) | |
| tree | 526a94de83489d353ef5de63d1493558975fcfcd /tests | |
| parent | 5163a1a307b920b5ba4bc26131536f97546c7052 (diff) | |
| parent | 04647bdf1f7fc80b0f2ccdc36a171c1dadb16a7e (diff) | |
Merge pull request #1146 from BradLewis/feat/selector-completion-improvements
Feat/selector completion improvements
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 26 | ||||
| -rw-r--r-- | tests/objc_test.odin | 1 |
2 files changed, 26 insertions, 1 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index ce30589..557a14a 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -4925,3 +4925,29 @@ ast_completion_local_when_condition_false :: proc(t: ^testing.T) { } test.expect_completion_docs(t, &source, "", {"test.foo: i64"}) } + +@(test) +ast_completion_selector_after_selector_call_expr :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + Data :: struct { + x, y: int, + } + + IFoo :: struct { + bar: proc(self: IFoo, x: int), + } + + print :: proc(self: IFoo, x: int) {} + + main :: proc() { + data := Data{3, 4} + foo := IFoo { + bar = print, + } + foo->bar(data.{*}) + } + `, + } + test.expect_completion_docs(t, &source, "", {"Data.x: int", "Data.y: int"}) +} diff --git a/tests/objc_test.odin b/tests/objc_test.odin index 4c6723b..64079c5 100644 --- a/tests/objc_test.odin +++ b/tests/objc_test.odin @@ -1,6 +1,5 @@ package tests -import "core:fmt" import "core:testing" import test "src:testing" |