funcs_test.go, more tests on the int() function

This commit is contained in:
Celestino Amoroso 2024-04-20 07:41:58 +02:00
parent f198ba47e1
commit 730b59e6d3

View File

@ -28,6 +28,8 @@ func TestFuncs(t *testing.T) {
/* 7 */ {`int(3.9)`, int64(3), nil},
/* 8 */ {`int("432")`, int64(432), nil},
/* 9 */ {`int("1.5")`, nil, errors.New(`strconv.Atoi: parsing "1.5": invalid syntax`)},
/* 10 */ {`int("432", 4)`, nil, errors.New(`int() requires exactly one param`)},
/* 11 */ {`int(nil)`, nil, errors.New(`int() can't convert <nil> to int`)},
}
succeeded := 0