increased test coverage (83.9%)

This commit is contained in:
2026-05-21 03:06:52 +02:00
parent 1055569dd6
commit a62f27b104
10 changed files with 190 additions and 45 deletions
+6
View File
@@ -35,6 +35,12 @@ func TestOperator(t *testing.T) {
/* 20 */ {`a=1; a^=2`, int64(3), nil},
/* 21 */ {`a=1; ++a`, int64(2), nil},
/* 22 */ {`a=1; --a`, int64(0), nil},
/* 23 */ {`a=1; a++`, int64(1), nil},
/* 24 */ {`a=1; a--`, int64(1), nil},
/* 25 */ {`a="1"; ++a`, nil, `[1:9] prefix/postfix operator "++" does not support operand '1' [string]`},
/* 26 */ {`a="1"; --a`, nil, `[1:9] prefix/postfix operator "--" does not support operand '1' [string]`},
/* 27 */ {`a="1"; a++`, nil, `[1:10] prefix/postfix operator "++" does not support operand '1' [string]`},
/* 28 */ {`a="1"; a--`, nil, `[1:10] prefix/postfix operator "--" does not support operand '1' [string]`},
}
// t.Setenv("EXPR_PATH", ".")