From 0f19f9dd518f42f0a620ef5f6184c632860f499c Mon Sep 17 00:00:00 2001 From: Alexey Date: Sun, 12 Apr 2020 02:37:34 +0300 Subject: [PATCH] tests: test call of variadic function with no arguments --- vlib/v/tests/fn_variadic_test.v | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/vlib/v/tests/fn_variadic_test.v b/vlib/v/tests/fn_variadic_test.v index 2348ee75a6..0adccaaa27 100644 --- a/vlib/v/tests/fn_variadic_test.v +++ b/vlib/v/tests/fn_variadic_test.v @@ -49,12 +49,20 @@ fn test_fn_variadic_forward() { assert variadic_forward_a('a','b','c') == 'abc' } -fn variadic_test_no_args(name string, groups ...VaTestGroup) { +fn fn_variadic_with_arg_no_vargs(name string, groups ...VaTestGroup) { assert groups.len == 0 } -fn test_fn_variadic_no_args() { - variadic_test_no_args('marko') +fn test_fn_variadic_with_arg_no_vargs() { + fn_variadic_with_arg_no_vargs('marko') +} + +fn fn_variadic_only_with_no_vargs(groups ...VaTestGroup) { + assert groups.len == 0 +} + +fn test_variadic_only_with_no_vargs() { + fn_variadic_only_with_no_vargs() } struct VaTestStruct {}