diff --git a/src/build/expression/Expression_test.go b/src/build/expression/Expression_test.go index 99f2ac2..62ce2d9 100644 --- a/src/build/expression/Expression_test.go +++ b/src/build/expression/Expression_test.go @@ -87,6 +87,8 @@ func TestExpressionParse(t *testing.T) { src := []byte(test.Expression) tokens := token.Tokenize(src) expr := expression.Parse(tokens) + defer expr.Close() + assert.NotNil(t, expr) assert.Equal(t, expr.String(), test.Result) }) @@ -94,7 +96,7 @@ func TestExpressionParse(t *testing.T) { } func BenchmarkExpression(b *testing.B) { - src := []byte("(1+2-3*4)!=(5*6-7+8)\n") + src := []byte("(1+2-3*4)+(5*6-7+8)\n") tokens := token.Tokenize(src) for i := 0; i < b.N; i++ {