mirror of https://github.com/jackc/pgx.git
Add tests for Int(2|4|8).Set accepting float(32|64)
parent
909d814f65
commit
376361f53d
|
@ -37,6 +37,8 @@ func TestInt2Set(t *testing.T) {
|
|||
{source: uint16(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint32(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint64(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: float32(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: float64(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: "1", result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
{source: _int8(1), result: pgtype.Int2{Int: 1, Status: pgtype.Present}},
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ func TestInt4Set(t *testing.T) {
|
|||
{source: uint16(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint32(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint64(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: float32(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: float64(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: "1", result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
{source: _int8(1), result: pgtype.Int4{Int: 1, Status: pgtype.Present}},
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ func TestInt8Set(t *testing.T) {
|
|||
{source: uint16(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint32(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: uint64(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: float32(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: float64(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: "1", result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
{source: _int8(1), result: pgtype.Int8{Int: 1, Status: pgtype.Present}},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue