expr_test.go, more tests on the int() function
This commit is contained in:
parent
730b59e6d3
commit
6ae5ca34ed
@ -21,6 +21,7 @@ func TestExpr(t *testing.T) {
|
||||
/* 1 */ {`0?{}`, nil, nil},
|
||||
/* 2 */ {`fact=func(n){(n)?{1}::{n*fact(n-1)}}; fact(5)`, int64(120), nil},
|
||||
/* 3 */ {`f=openFile("test-file.txt"); line=readFile(f); closeFile(f); line`, "uno", nil},
|
||||
/* 4 */ {`mynot=func(v){int(v)?{true}::{false}}; mynot(0)`, true, nil},
|
||||
}
|
||||
|
||||
succeeded := 0
|
||||
|
Loading…
Reference in New Issue
Block a user