...
1 package pgtype_test
2
3 import (
4 "testing"
5
6 "github.com/jackc/pgtype"
7 "github.com/jackc/pgtype/testutil"
8 )
9
10 func TestPathTranscode(t *testing.T) {
11 testutil.TestSuccessfulTranscode(t, "path", []interface{}{
12 &pgtype.Path{
13 P: []pgtype.Vec2{{3.14, 1.678901234}, {7.1, 5.234}},
14 Closed: false,
15 Status: pgtype.Present,
16 },
17 &pgtype.Path{
18 P: []pgtype.Vec2{{3.14, 1.678}, {7.1, 5.234}, {23.1, 9.34}},
19 Closed: true,
20 Status: pgtype.Present,
21 },
22 &pgtype.Path{
23 P: []pgtype.Vec2{{7.1, 1.678}, {-13.14, -5.234}},
24 Closed: true,
25 Status: pgtype.Present,
26 },
27 &pgtype.Path{Status: pgtype.Null},
28 })
29 }
30
View as plain text