MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / TestLiteralValuePooling

Function TestLiteralValuePooling

pkg/sql/ast/coverage_test.go:661–672  ·  view source on GitHub ↗

TestLiteralValuePooling tests LiteralValue pooling

(t *testing.T)

Source from the content-addressed store, hash-verified

659
660// TestLiteralValuePooling tests LiteralValue pooling
661func TestLiteralValuePooling(t *testing.T) {
662 t.Run("get and put literal value", func(t *testing.T) {
663 lit := GetLiteralValue()
664 lit.Value = "test_value"
665 lit.Type = "string"
666 PutLiteralValue(lit)
667 })
668
669 t.Run("nil literal value", func(t *testing.T) {
670 PutLiteralValue(nil) // Should not panic
671 })
672}
673
674// TestOrderByExpressionChildren tests OrderByExpression.Children()
675func TestOrderByExpressionChildren(t *testing.T) {

Callers

nothing calls this directly

Calls 3

GetLiteralValueFunction · 0.85
PutLiteralValueFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected