...
1 package pgtype_test
2
3 import (
4 "context"
5 "testing"
6
7 "github.com/jackc/pgx/v5/pgtype"
8 "github.com/jackc/pgx/v5/pgxtest"
9 )
10
11 func TestLtreeCodec(t *testing.T) {
12 skipCockroachDB(t, "Server does not support type ltree")
13
14 pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, pgxtest.KnownOIDQueryExecModes, "ltree", []pgxtest.ValueRoundTripTest{
15 {
16 Param: "A.B.C",
17 Result: new(string),
18 Test: isExpectedEq("A.B.C"),
19 },
20 {
21 Param: pgtype.Text{String: "", Valid: true},
22 Result: new(pgtype.Text),
23 Test: isExpectedEq(pgtype.Text{String: "", Valid: true}),
24 },
25 })
26 }
27
View as plain text