builtin-base: removed useless function unset(). See UNSET operator
This commit is contained in:
@@ -49,6 +49,18 @@ func TestFuncs(t *testing.T) {
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
func TestFuncs2(t *testing.T) {
|
||||
section := "Funcs2"
|
||||
inputs := []inputType{
|
||||
/* 1 */ {`sum=func(a,b){a+b}; sum(1,2)`, int64(3), nil},
|
||||
/* 2 */ {`sum=func(a,b){a+b}; sum(1)`, nil, `sum(): too few params -- expected 2, got 1`},
|
||||
/* 3 */ {`["1", "2", "3"] map int()`, nil, `int(): too few params -- expected 1, got 0`},
|
||||
/* 4 */ {`builtin "iterator"; times=func(a,b){a*b}; run($(["1", "2", "3"]), times)`, nil, `operator(): missing params -- a, b`},
|
||||
}
|
||||
// runTestSuiteSpec(t, section, inputs, 4)
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
func dummy(ctx kern.ExprContext, name string, args map[string]any) (result any, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user