2
0

Removed TextEncoder and BinaryEncoder

Restructured / fixed a lot of tests along the way.
This commit is contained in:
Jack Christensen
2022-01-22 12:07:35 -06:00
parent eb0a4c9626
commit 3a90c6c879
50 changed files with 295 additions and 758 deletions
+4 -3
View File
@@ -6,10 +6,11 @@ import (
"testing"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt2Codec(t *testing.T) {
testPgxCodec(t, "int2", []PgxTranscodeTestCase{
testutil.RunTranscodeTests(t, "int2", []testutil.TranscodeTestCase{
{int8(1), new(int16), isExpectedEq(int16(1))},
{int16(1), new(int16), isExpectedEq(int16(1))},
{int32(1), new(int16), isExpectedEq(int16(1))},
@@ -89,7 +90,7 @@ func TestInt2UnmarshalJSON(t *testing.T) {
}
func TestInt4Codec(t *testing.T) {
testPgxCodec(t, "int4", []PgxTranscodeTestCase{
testutil.RunTranscodeTests(t, "int4", []testutil.TranscodeTestCase{
{int8(1), new(int32), isExpectedEq(int32(1))},
{int16(1), new(int32), isExpectedEq(int32(1))},
{int32(1), new(int32), isExpectedEq(int32(1))},
@@ -169,7 +170,7 @@ func TestInt4UnmarshalJSON(t *testing.T) {
}
func TestInt8Codec(t *testing.T) {
testPgxCodec(t, "int8", []PgxTranscodeTestCase{
testutil.RunTranscodeTests(t, "int8", []testutil.TranscodeTestCase{
{int8(1), new(int64), isExpectedEq(int64(1))},
{int16(1), new(int64), isExpectedEq(int64(1))},
{int32(1), new(int64), isExpectedEq(int64(1))},