test on '@@'
This commit is contained in:
parent
7612a59757
commit
f74e523617
@ -145,17 +145,18 @@ func TestParser(t *testing.T) {
|
|||||||
/* 124 */ {`f=func(@y){g=func(){@x=5}; g(); @z=x; @y=@y+@z}; f(2); y+z`, int64(12), nil},
|
/* 124 */ {`f=func(@y){g=func(){@x=5}; g(); @z=x; @y=@y+@z}; f(2); y+z`, int64(12), nil},
|
||||||
/* 125 */ {`f=func(@y){g=func(){@x=5}; g(); @z=x; @x=@y+@z}; f(2); y+x`, int64(9), nil},
|
/* 125 */ {`f=func(@y){g=func(){@x=5}; g(); @z=x; @x=@y+@z}; f(2); y+x`, int64(9), nil},
|
||||||
/* 126 */ {`include("./test-funcs.expr"); six()`, int64(6), nil},
|
/* 126 */ {`include("./test-funcs.expr"); six()`, int64(6), nil},
|
||||||
|
/* 127 */ {`import("./sample-export-all.expr"); six()`, int64(6), nil},
|
||||||
}
|
}
|
||||||
check_env_expr_path := 113
|
check_env_expr_path := 113
|
||||||
|
|
||||||
succeeded := 0
|
succeeded := 0
|
||||||
failed := 0
|
failed := 0
|
||||||
|
|
||||||
inputs1 := []inputType{
|
// inputs1 := []inputType{
|
||||||
{`import("./test-funcs.expr"); six()`, int64(6), nil},
|
// {`import("./sample-export-all.expr"); six()`, int64(6), nil},
|
||||||
}
|
// }
|
||||||
|
|
||||||
for i, input := range inputs1 {
|
for i, input := range inputs {
|
||||||
var expr *ast
|
var expr *ast
|
||||||
var gotResult any
|
var gotResult any
|
||||||
var gotErr error
|
var gotErr error
|
||||||
@ -201,7 +202,7 @@ func TestParser(t *testing.T) {
|
|||||||
t.Log(fmt.Sprintf("test count: %d, succeeded count: %d, failed count: %d", len(inputs), succeeded, failed))
|
t.Log(fmt.Sprintf("test count: %d, succeeded count: %d, failed count: %d", len(inputs), succeeded, failed))
|
||||||
}
|
}
|
||||||
|
|
||||||
func NoTestListParser(t *testing.T) {
|
func TestListParser(t *testing.T) {
|
||||||
type inputType struct {
|
type inputType struct {
|
||||||
source string
|
source string
|
||||||
wantResult any
|
wantResult any
|
||||||
|
Loading…
Reference in New Issue
Block a user