TestPutBinaryExpressionWithContent tests returning BinaryExpressions to pool
(t *testing.T)
| 619 | |
| 620 | // TestPutBinaryExpressionWithContent tests returning BinaryExpressions to pool |
| 621 | func TestPutBinaryExpressionWithContent(t *testing.T) { |
| 622 | t.Run("binary expression with children", func(t *testing.T) { |
| 623 | expr := GetBinaryExpression() |
| 624 | expr.Left = &Identifier{Name: "x"} |
| 625 | expr.Right = &LiteralValue{Value: 10} |
| 626 | expr.Operator = ">" |
| 627 | PutBinaryExpression(expr) |
| 628 | }) |
| 629 | |
| 630 | t.Run("nil binary expression", func(t *testing.T) { |
| 631 | PutBinaryExpression(nil) // Should not panic |
| 632 | }) |
| 633 | |
| 634 | t.Run("binary expression nil children", func(t *testing.T) { |
| 635 | expr := GetBinaryExpression() |
| 636 | expr.Operator = "=" |
| 637 | PutBinaryExpression(expr) |
| 638 | }) |
| 639 | } |
| 640 | |
| 641 | // TestPutExpressionSliceWithContent tests returning expression slices to pool |
| 642 | func TestPutExpressionSliceWithContent(t *testing.T) { |
nothing calls this directly
no test coverage detected