github.com/jackc/pgx/v5@v5.5.5/pgtype/circle_test.go (about) 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 TestCircleTranscode(t *testing.T) { 12 skipCockroachDB(t, "Server does not support box type") 13 14 pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, nil, "circle", []pgxtest.ValueRoundTripTest{ 15 { 16 pgtype.Circle{P: pgtype.Vec2{1.234, 5.67890123}, R: 3.5, Valid: true}, 17 new(pgtype.Circle), 18 isExpectedEq(pgtype.Circle{P: pgtype.Vec2{1.234, 5.67890123}, R: 3.5, Valid: true}), 19 }, 20 { 21 pgtype.Circle{P: pgtype.Vec2{1.234, 5.67890123}, R: 3.5, Valid: true}, 22 new(pgtype.Circle), 23 isExpectedEq(pgtype.Circle{P: pgtype.Vec2{1.234, 5.67890123}, R: 3.5, Valid: true}), 24 }, 25 {pgtype.Circle{}, new(pgtype.Circle), isExpectedEq(pgtype.Circle{})}, 26 {nil, new(pgtype.Circle), isExpectedEq(pgtype.Circle{})}, 27 }) 28 }