diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-01-09 00:15:10 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-01-09 00:15:10 +0100 |
| commit | b2705f673df1c82dbbc4d97aa6aa3053222ca5c3 (patch) | |
| tree | c8ccc4e4ebed7b63017376f4c187e601f050f65c /tests | |
| parent | 976ae722600931b47b16fd7e1d906f7aa71f5d3f (diff) | |
Add matrix_type to clone node
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/completions_test.odin | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin index 3553461..e5a9460 100644 --- a/tests/completions_test.odin +++ b/tests/completions_test.odin @@ -2572,3 +2572,39 @@ ast_poly_proc_matrix_constant_array_2 :: proc(t: ^testing.T) { test.expect_completion_details(t, &source, "", {"test.myss: [10]f32"}) } + +@(test) +ast_poly_proc_matrix_whole :: proc(t: ^testing.T) { + packages := make([dynamic]test.Package) + + source := test.Source { + main = `package test + + @(require_results) + matrix_mul :: proc "contextless" ( + a, b: $M/matrix[$N, N]$E, + ) -> ( + c: M, + ) where !IS_ARRAY(E), + IS_NUMERIC(E) #no_bounds_check { + return a * b + } + + matrix4_from_trs_f16 :: proc "contextless" () -> matrix[4, 4]f32 { + translation: matrix[4, 4]f32 + rotation: matrix[4, 4]f32 + dsszz := matrix_mul(scale, translation) + dssz{*} + } + `, + packages = {}, + } + + test.expect_completion_details( + t, + &source, + "", + {"test.dsszz: matrix[4,4]f32"}, + ) + +} |