...

Source file src/github.com/jackc/pgtype/lseg_test.go

Documentation: github.com/jackc/pgtype

     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 TestLsegTranscode(t *testing.T) {
    11  	testutil.TestSuccessfulTranscode(t, "lseg", []interface{}{
    12  		&pgtype.Lseg{
    13  			P:      [2]pgtype.Vec2{{3.14, 1.678}, {7.1, 5.2345678901}},
    14  			Status: pgtype.Present,
    15  		},
    16  		&pgtype.Lseg{
    17  			P:      [2]pgtype.Vec2{{7.1, 1.678}, {-13.14, -5.234}},
    18  			Status: pgtype.Present,
    19  		},
    20  		&pgtype.Lseg{Status: pgtype.Null},
    21  	})
    22  }
    23  

View as plain text