mirror of https://github.com/jackc/pgx.git
27 lines
614 B
Go
27 lines
614 B
Go
package pgtype_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
"github.com/jackc/pgx/v5/pgxtest"
|
|
)
|
|
|
|
func TestLtreeCodec(t *testing.T) {
|
|
skipCockroachDB(t, "Server does not support type ltree")
|
|
|
|
pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, pgxtest.KnownOIDQueryExecModes, "ltree", []pgxtest.ValueRoundTripTest{
|
|
{
|
|
Param: "A.B.C",
|
|
Result: new(string),
|
|
Test: isExpectedEq("A.B.C"),
|
|
},
|
|
{
|
|
Param: pgtype.Text{String: "", Valid: true},
|
|
Result: new(pgtype.Text),
|
|
Test: isExpectedEq(pgtype.Text{String: "", Valid: true}),
|
|
},
|
|
})
|
|
}
|