2
0
This commit is contained in:
Jack Christensen
2017-04-04 08:40:41 -05:00
parent 365005d207
commit d14de1d1fc
4 changed files with 236 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
package pgtype_test
import (
"testing"
"github.com/jackc/pgx/pgtype"
)
func TestPathTranscode(t *testing.T) {
testSuccessfulTranscode(t, "path", []interface{}{
&pgtype.Path{
P: []pgtype.Vec2{{3.14, 1.678}, {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},
})
}