test on '@@'

This commit is contained in:
Celestino Amoroso 2024-04-06 03:09:02 +02:00
parent 7612a59757
commit f74e523617

View File

@ -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},
/* 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},
/* 127 */ {`import("./sample-export-all.expr"); six()`, int64(6), nil},
}
check_env_expr_path := 113
succeeded := 0
failed := 0
inputs1 := []inputType{
{`import("./test-funcs.expr"); six()`, int64(6), nil},
}
// inputs1 := []inputType{
// {`import("./sample-export-all.expr"); six()`, int64(6), nil},
// }
for i, input := range inputs1 {
for i, input := range inputs {
var expr *ast
var gotResult any
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))
}
func NoTestListParser(t *testing.T) {
func TestListParser(t *testing.T) {
type inputType struct {
source string
wantResult any