aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index 09e44d0..a9909d5 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -508,6 +508,46 @@ ast_for_in_identifier_completion :: proc(t: ^testing.T) {
test.expect_completion_details(t, &source, "", {"test.my_element: My_Struct"});
}
+@(test)
+ast_completion_poly_struct_proc :: proc(t: ^testing.T) {
+
+ source := test.Source {
+ main = `package test
+ RenderPass :: struct(type : typeid) { list : ^int, data : type, }
+
+ LightingAccumPass2 :: struct {
+ foo: int,
+ }
+
+ execute_lighting_pass2 :: proc(pass : RenderPass(LightingAccumPass2)) {
+ pass.*
+ }
+ `,
+ packages = {},
+ };
+
+ test.expect_completion_details(t, &source, "", {"RenderPass.list: ^int"});
+}
+
+/*
+@(test)
+ast_completion_core_fmt_proc :: proc(t: ^testing.T) {
+
+ source := test.Source {
+ main = `package test
+ import "core:fmt"
+ main :: proc() {
+ fmt.*
+ }
+ `,
+ packages = {},
+ };
+
+ test.expect_completion_details(t, &source, "", {"RenderPass.list: ^int"});
+
+}
+*/
+
/*
Figure out whether i want to introduce the runtime to the tests