...

Source file src/github.com/jackc/pgx/v5/pgtype/uint32_test.go

Documentation: github.com/jackc/pgx/v5/pgtype

     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 TestUint32Codec(t *testing.T) {
    12  	pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, pgxtest.KnownOIDQueryExecModes, "oid", []pgxtest.ValueRoundTripTest{
    13  		{
    14  			pgtype.Uint32{Uint32: pgtype.TextOID, Valid: true},
    15  			new(pgtype.Uint32),
    16  			isExpectedEq(pgtype.Uint32{Uint32: pgtype.TextOID, Valid: true}),
    17  		},
    18  		{pgtype.Uint32{}, new(pgtype.Uint32), isExpectedEq(pgtype.Uint32{})},
    19  		{nil, new(pgtype.Uint32), isExpectedEq(pgtype.Uint32{})},
    20  	})
    21  }
    22  

View as plain text