The function parameter model has been modified to support the passing of named parameters
This commit is contained in:
@@ -21,7 +21,7 @@ func TestFuncBase(t *testing.T) {
|
||||
/* 7 */ {`int(3.9)`, int64(3), nil},
|
||||
/* 8 */ {`int("432")`, int64(432), nil},
|
||||
/* 9 */ {`int("1.5")`, nil, `strconv.Atoi: parsing "1.5": invalid syntax`},
|
||||
/* 10 */ {`int("432", 4)`, nil, `int(): too much params -- expected 1, got 2`},
|
||||
/* 10 */ {`int("432", 4)`, nil, `int(): too many params -- expected 1, got 2`},
|
||||
/* 11 */ {`int(nil)`, nil, `int(): can't convert nil to int`},
|
||||
/* 12 */ {`isInt(2+1)`, true, nil},
|
||||
/* 13 */ {`isInt(3.1)`, false, nil},
|
||||
@@ -43,7 +43,7 @@ func TestFuncBase(t *testing.T) {
|
||||
/* 29 */ {`dec(true)`, float64(1), nil},
|
||||
/* 30 */ {`dec(true")`, nil, `[1:11] missing string termination "`},
|
||||
/* 31 */ {`dec()`, nil, `dec(): too few params -- expected 1, got 0`},
|
||||
/* 32 */ {`dec(1,2,3)`, nil, `dec(): too much params -- expected 1, got 3`},
|
||||
/* 32 */ {`dec(1,2,3)`, nil, `dec(): too many params -- expected 1, got 3`},
|
||||
/* 33 */ {`isBool(false)`, true, nil},
|
||||
/* 34 */ {`fract(1|2)`, newFraction(1, 2), nil},
|
||||
/* 35 */ {`fract(12,2)`, newFraction(6, 1), nil},
|
||||
@@ -61,5 +61,6 @@ func TestFuncBase(t *testing.T) {
|
||||
|
||||
t.Setenv("EXPR_PATH", ".")
|
||||
|
||||
//runTestSuiteSpec(t, section, inputs, 10)
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user