aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2021-04-28 14:08:49 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2021-04-28 14:08:49 +0200
commitbd4e3b3990593d10def18984101ae68f275eefea (patch)
tree75616fc8573854b4f0c518869f03bb7f7c97f001 /tests
parentab77d1bf51541b745388fce1df64f62fea664906 (diff)
started on untyped proc overloading handling
Diffstat (limited to 'tests')
-rw-r--r--tests/signatures_test.odin30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/signatures_test.odin b/tests/signatures_test.odin
index 4d673fc..ccefc35 100644
--- a/tests/signatures_test.odin
+++ b/tests/signatures_test.odin
@@ -39,7 +39,7 @@ ast_simple_proc_signature :: proc(t: ^testing.T) {
}
@(test)
-ast_proc_group_signature :: proc(t: ^testing.T) {
+ast_proc_group_signature_empty_call :: proc(t: ^testing.T) {
source := test.Source {
main = `package test
@@ -64,4 +64,32 @@ ast_proc_group_signature :: proc(t: ^testing.T) {
};
test.expect_signature_labels(t, &source, {"test.int_function: proc(a: int)", "test.bool_function: proc(a: bool)"});
+}
+
+@(test)
+ast_proc_group_signature_basic_types :: proc(t: ^testing.T) {
+
+ source := test.Source {
+ main = `package test
+ int_function :: proc(a: int, b: bool, c: int) {
+
+ }
+
+ bool_function :: proc(a: bool, b: bool, c: bool) {
+
+ }
+
+ group_function :: proc {
+ int_function,
+ bool_function,
+ };
+
+ main :: proc() {
+ group_function(2, true, *)
+ }
+ `,
+ source_packages = {},
+ };
+
+ test.expect_signature_labels(t, &source, {"test.int_function: proc(a: int, b: bool, c: int)"});
} \ No newline at end of file