diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/signatures_test.odin | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin index 9877577..b1a71e1 100644 --- a/tests/signatures_test.odin +++ b/tests/signatures_test.odin @@ -127,4 +127,49 @@ ast_proc_group_signature_distinct_basic_types :: proc(t: ^testing.T) { }; test.expect_signature_labels(t, &source, {"test.distinct_function: proc(a: My_Int, c: int)"}); -}
\ No newline at end of file +} + +@(test) +ast_proc_group_signature_struct :: proc(t: ^testing.T) { + + source := test.Source { + main = `package test + + My_Int :: distinct int; + + My_Struct :: struct { + one: int, + two: int, + three: int, + } + + distinct_function :: proc(a: My_Int, c: int) { + + } + + int_function :: proc(a: int, c: int) { + + } + + struct_function :: proc(a: int, b: My_Struct, c: int) { + + } + + group_function :: proc { + int_function, + distinct_function, + struct_function, + }; + + main :: proc() { + a: int; + b: My_Struct; + group_function(a, b, *) + } + `, + source_packages = {}, + }; + + test.expect_signature_labels(t, &source, {"test.struct_function: proc(a: int, b: My_Struct, c: int)"}); +} + |