fixed an error message (test nr 97)

This commit is contained in:
Celestino Amoroso 2024-06-04 11:04:59 +02:00
parent 905b2af7fa
commit f2d6d63017

View File

@ -115,7 +115,7 @@ func TestGeneralParser(t *testing.T) {
/* 94 */ {`false or true`, true, nil}, /* 94 */ {`false or true`, true, nil},
/* 95 */ {`false or (x==2)`, nil, errors.New(`undefined variable or function "x"`)}, /* 95 */ {`false or (x==2)`, nil, errors.New(`undefined variable or function "x"`)},
/* 96 */ {`a=5; a`, int64(5), nil}, /* 96 */ {`a=5; a`, int64(5), nil},
/* 97 */ {`2=5`, nil, errors.New(`assign operator ("=") must be preceded by a variable`)}, /* 97 */ {`2=5`, nil, errors.New(`[1:2] left operand of "=" must be a variable`)},
/* 98 */ {`2+a=5`, nil, errors.New(`[1:3] left operand of "=" must be a variable`)}, /* 98 */ {`2+a=5`, nil, errors.New(`[1:3] left operand of "=" must be a variable`)},
/* 99 */ {`2+(a=5)`, int64(7), nil}, /* 99 */ {`2+(a=5)`, int64(7), nil},
/* 100 */ {`x ?? "default"`, "default", nil}, /* 100 */ {`x ?? "default"`, "default", nil},