pgx/pgtype/uint32_test.go
Jack Christensen 2885b039d5 Rename Uint32 field to include bit size
i.e. Uint renamed to Uint32. This matches the pattern set by the
database/sql types.
2022-03-05 09:23:25 -06:00

21 lines
521 B
Go

package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestUint32Codec(t *testing.T) {
testutil.RunTranscodeTests(t, "oid", []testutil.TranscodeTestCase{
{
pgtype.Uint32{Uint32: pgtype.TextOID, Valid: true},
new(pgtype.Uint32),
isExpectedEq(pgtype.Uint32{Uint32: pgtype.TextOID, Valid: true}),
},
{pgtype.Uint32{}, new(pgtype.Uint32), isExpectedEq(pgtype.Uint32{})},
{nil, new(pgtype.Uint32), isExpectedEq(pgtype.Uint32{})},
})
}