parser_test.go: removed commented code
This commit is contained in:
parent
569dbfda9d
commit
7cfb89c25c
@ -156,6 +156,7 @@ func TestGeneralParser(t *testing.T) {
|
|||||||
/* 135 */ {`builtin "math.arith"; mul(1|2, 2|3)`, newFraction(2, 6), nil},
|
/* 135 */ {`builtin "math.arith"; mul(1|2, 2|3)`, newFraction(2, 6), nil},
|
||||||
/* 136 */ {`builtin "math.arith"; mul(1|2, 1.0, 2)`, float64(1.0), nil},
|
/* 136 */ {`builtin "math.arith"; mul(1|2, 1.0, 2)`, float64(1.0), nil},
|
||||||
/* 137 */ {`builtin "os.file"`, int64(1), nil},
|
/* 137 */ {`builtin "os.file"`, int64(1), nil},
|
||||||
|
/* 138 */ {`v=10; v++; v`, int64(11), nil},
|
||||||
}
|
}
|
||||||
|
|
||||||
// t.Setenv("EXPR_PATH", ".")
|
// t.Setenv("EXPR_PATH", ".")
|
||||||
@ -167,20 +168,12 @@ func parserTest(t *testing.T, section string, inputs []inputType) {
|
|||||||
succeeded := 0
|
succeeded := 0
|
||||||
failed := 0
|
failed := 0
|
||||||
|
|
||||||
// inputs1 := []inputType{
|
|
||||||
// /* 159 */ {`include "file-reader.expr"; it=$(ds,"int.list"); mul(it)`, int64(12000), nil},
|
|
||||||
// }
|
|
||||||
|
|
||||||
for i, input := range inputs {
|
for i, input := range inputs {
|
||||||
var expr Expr
|
var expr Expr
|
||||||
var gotResult any
|
var gotResult any
|
||||||
var gotErr error
|
var gotErr error
|
||||||
|
|
||||||
ctx := NewSimpleFuncStore()
|
ctx := NewSimpleFuncStore()
|
||||||
// ctx.SetVar("var1", int64(123))
|
|
||||||
// ctx.SetVar("var2", "abc")
|
|
||||||
// ImportMathFuncs(ctx)
|
|
||||||
// ImportImportFuncs(ctx)
|
|
||||||
parser := NewParser(ctx)
|
parser := NewParser(ctx)
|
||||||
|
|
||||||
logTest(t, i+1, "Iterator", input.source, input.wantResult, input.wantErr)
|
logTest(t, i+1, "Iterator", input.source, input.wantResult, input.wantErr)
|
||||||
|
Loading…
Reference in New Issue
Block a user