aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-09-06 22:37:04 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2021-09-06 22:37:04 +0200
commitbeb847bdb64ef80cb77e5f9d609c8ffedce6e963 (patch)
tree0899353f4e942f00214ae16e7076a8f4b0d644e1 /tests
parent4bbb39a130012ff808864e9f528c7696caca483c (diff)
Add new tests + uncomment some code until it is fixed in odin
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