diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 3655b42..70fc965 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -1063,12 +1063,37 @@ ast_implicit_mixed_named_and_unnamed_comp_lit_bitset :: proc(t: ^testing.T) { } } `, - }; + } test.expect_completion_details(t, &source, ".", {"A", "B", "C"}); } @(test) +ast_comp_lit_in_complit_completion :: proc(t: ^testing.T) { + source := test.Source { + main = `package main + My_Struct_2 :: struct { + aaa: int, + aab: int, + } + My_Struct :: struct { + foo: My_Struct_2, + } + + main :: proc() { + inst := My_Struct { + foo = { + a* + } + } + } + `, + } + + test.expect_completion_details(t, &source, "", {"My_Struct_2.aab: int", "My_Struct_2.aaa: int"}) +} + +@(test) ast_inlined_struct :: proc(t: ^testing.T) { source := test.Source { main = `package main @@ -1084,9 +1109,9 @@ ast_inlined_struct :: proc(t: ^testing.T) { inst.foo.* } `, - }; + } - test.expect_completion_details(t, &source, ".", {"struct.a: int", "struct.b: int"}); + test.expect_completion_details(t, &source, ".", {"struct.a: int", "struct.b: int"}) } @(test) |