aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-02-11 11:51:12 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-02-11 11:51:12 +0100
commitefe15efabd1b718f89c869ac9c1a6dbd680a8bc0 (patch)
tree1f51b0f11ada1c3858026febccec02e718efdc9c
parentd62b41847278bc3902da98e0a072b0f0ab1dc7ca (diff)
Add new test
-rw-r--r--tests/completions_test.odin33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 5f9b283..9933584 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -1286,3 +1286,36 @@ ast_index_proc_parameter_completion :: proc(t: ^testing.T) {
test.expect_completion_details(t, &source, ".", {"my_package.param: My_Struct"});
}
+
+@(test)
+ast_implicit_completion_in_comp_lit :: proc(t: ^testing.T) {
+ source := test.Source {
+ main = `package main
+ main :: proc() {
+ foo :: enum{ one, two }
+ bar := [foo]int{
+ .one = 1,
+ .*two = 2, // When adding the '.' here
+ }
+ }
+ `,
+ };
+
+ test.expect_completion_details(t, &source, ".", {"Not implemented - waiting for test system to work again"});
+}
+
+
+
+
+/*
+ Should be the same, but just check after fixing this:
+ E :: enum {
+ A,
+ B,
+ C,
+ }
+
+ x := [E]int {
+ .B = 1,
+ }
+*/ \ No newline at end of file