aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-07 16:49:59 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-09-08 21:09:30 -0400
commit0b0ed964435bdd5b89e8df525e20e86cc332f573 (patch)
treede3664b608834728e2e3fc7004c345cea16f4aae /tests
parent6a10502edbc83373344ac252869a1e33e8032e0e (diff)
Remove completions when entering bit_field or struct field names
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index a2c6883..d3a2eb7 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -4668,3 +4668,33 @@ ast_completion_union_with_enums_from_package :: proc(t: ^testing.T) {
{"my_package.Foo.A", "my_package.Foo.B", "my_package.Bar.A", "my_package.Bar.C"},
)
}
+
+@(test)
+ast_completion_struct_field_name :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ Foo :: struct{}
+
+ Bar :: struct {
+ f{*}
+ }
+ `,
+ }
+ test.expect_completion_docs(t, &source, "", {}, {"test.Foo: struct {}"})
+}
+
+@(test)
+ast_completion_struct_field_value :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package test
+
+ Foo :: struct{}
+
+ Bar :: struct {
+ foo: F{*}
+ }
+ `,
+ }
+ test.expect_completion_docs(t, &source, "", {"test.Foo: struct {}"})
+}