pgx/path_test.go
Jack Christensen c16a4f7d6a Revert "Temporarily delete tests and pgxtype to break recursive dependency with pgx"
This reverts commit 32e20a603178b49fb189d1be971d0fb6960cabb2.
2021-07-24 10:40:30 -05:00

30 lines
634 B
Go

package pgtype_test
import (
"testing"
"github.com/jackc/pgtype"
"github.com/jackc/pgtype/testutil"
)
func TestPathTranscode(t *testing.T) {
testutil.TestSuccessfulTranscode(t, "path", []interface{}{
&pgtype.Path{
P: []pgtype.Vec2{{3.14, 1.678901234}, {7.1, 5.234}},
Closed: false,
Status: pgtype.Present,
},
&pgtype.Path{
P: []pgtype.Vec2{{3.14, 1.678}, {7.1, 5.234}, {23.1, 9.34}},
Closed: true,
Status: pgtype.Present,
},
&pgtype.Path{
P: []pgtype.Vec2{{7.1, 1.678}, {-13.14, -5.234}},
Closed: true,
Status: pgtype.Present,
},
&pgtype.Path{Status: pgtype.Null},
})
}