diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 11:20:13 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 11:27:56 -0400 |
| commit | 34e42985f2bee18a9abf2d936070ba38d3fc5fa9 (patch) | |
| tree | 7e7efd3369b381271b061eca19fb217cf1c01350 /tests | |
| parent | aa4287a6c8bc06278db0abd5f7db902cf52af200 (diff) | |
Provide documentation for generic symbols
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 339b195..0b2bc5f 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -3421,7 +3421,6 @@ ast_complete_ptr_using :: proc(t: ^testing.T) { `, } - // TODO: add "{..}" to the struct in this example to match the others test.expect_completion_docs(t, &source, "", {`A.b: ^test.B`, `A.a: ^struct {..}`, `A.foo: int`, `A.f: int`}) } @@ -4389,3 +4388,30 @@ ast_completion_enum_map_value_global :: proc(t: ^testing.T) { test.expect_completion_docs(t, &source, "", {"A", "B", "C"}) } + +@(test) +ast_completion_basic_type_other_pkg :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package, context.temp_allocator) + + append( + &packages, + test.Package { + pkg = "my_package", + source = `package my_package + foo: int + `, + }, + ) + source := test.Source { + main = `package test + import "my_package" + + foo :: proc() { + my_package.f{*} + } + `, + packages = packages[:], + } + + test.expect_completion_docs(t, &source, "", {"my_package.foo: int"}) +} |