TestPutExpressionSliceWithContent tests returning expression slices to pool
(t *testing.T)
| 640 | |
| 641 | // TestPutExpressionSliceWithContent tests returning expression slices to pool |
| 642 | func TestPutExpressionSliceWithContent(t *testing.T) { |
| 643 | t.Run("expression slice with content", func(t *testing.T) { |
| 644 | slice := GetExpressionSlice() |
| 645 | *slice = append(*slice, &Identifier{Name: "col1"}) |
| 646 | *slice = append(*slice, &LiteralValue{Value: 42}) |
| 647 | PutExpressionSlice(slice) |
| 648 | }) |
| 649 | |
| 650 | t.Run("nil expression slice", func(t *testing.T) { |
| 651 | PutExpressionSlice(nil) // Should not panic |
| 652 | }) |
| 653 | |
| 654 | t.Run("empty expression slice", func(t *testing.T) { |
| 655 | slice := GetExpressionSlice() |
| 656 | PutExpressionSlice(slice) |
| 657 | }) |
| 658 | } |
| 659 | |
| 660 | // TestLiteralValuePooling tests LiteralValue pooling |
| 661 | func TestLiteralValuePooling(t *testing.T) { |
nothing calls this directly
no test coverage detected