From 6786666cf461b665cb458f087d85325eb1ff3ad7 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Wed, 15 May 2024 22:03:41 +0200 Subject: [PATCH] funcs_test.go: added some tests --- funcs_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/funcs_test.go b/funcs_test.go index 7df2e82..a85e28d 100644 --- a/funcs_test.go +++ b/funcs_test.go @@ -76,6 +76,9 @@ func TestFuncs(t *testing.T) { /* 63 */ {`dec(true)`, float64(1), nil}, /* 64 */ {`dec(true")`, nil, errors.New("[1:11] missing string termination \"")}, /* 65 */ {`builtin "string"; joinStr("-", [1, "two", "three"])`, nil, errors.New(`joinStr() expected string, got int64 (1)`)}, + /* 65 */ {`dec()`, nil, errors.New(`too few params -- expected 1, got 0`)}, + /* 66 */ {`dec(1,2,3)`, nil, errors.New(`too much params -- expected 1, got 3`)}, + /* 67 */ {`builtin "string"; joinStr()`, nil, errors.New(`too few params -- expected 1 or more, got 0`)}, // /* 64 */ {`string(true)`, "true", nil}, }