mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: test call of variadic function with no arguments
This commit is contained in:
parent
4b029567e5
commit
0f19f9dd51
@ -49,12 +49,20 @@ fn test_fn_variadic_forward() {
|
|||||||
assert variadic_forward_a('a','b','c') == 'abc'
|
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
|
assert groups.len == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_fn_variadic_no_args() {
|
fn test_fn_variadic_with_arg_no_vargs() {
|
||||||
variadic_test_no_args('marko')
|
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 {}
|
struct VaTestStruct {}
|
||||||
|
Loading…
Reference in New Issue
Block a user