From d110f0de74536810468ffa9902edec485c6f8ebb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 9 Feb 2021 14:11:09 +0200 Subject: [PATCH] tests: add a regression test for 3d2afcf --- .../tests/go_handle_for_functions_returning_array_test.v | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vlib/v/tests/go_handle_for_functions_returning_array_test.v diff --git a/vlib/v/tests/go_handle_for_functions_returning_array_test.v b/vlib/v/tests/go_handle_for_functions_returning_array_test.v new file mode 100644 index 0000000000..6a030c53c5 --- /dev/null +++ b/vlib/v/tests/go_handle_for_functions_returning_array_test.v @@ -0,0 +1,9 @@ +fn create_random_frames(amount int, pixels int) [][][]int { + return [[[amount, pixels]]] +} + +fn test_go_can_be_used_with_functions_returning_arrays() { + x := go create_random_frames(2, 2) + res := x.wait() + assert res == [[[2, 2]]] +}