uncomment tests

pull/1835/head
Eshton Robateau 2023-11-24 07:30:39 +08:00 committed by Jack Christensen
parent 9927e14bbf
commit 905f252667
1 changed files with 42 additions and 42 deletions

View File

@ -241,48 +241,48 @@ func TestNumericUnmarshalJSON(t *testing.T) {
src []byte
wantErr bool
}{
// {
// name: "null",
// want: &pgtype.Numeric{},
// src: []byte(`null`),
// wantErr: false,
// },
// {
// name: "NaN",
// want: &pgtype.Numeric{Valid: true, NaN: true},
// src: []byte(`"NaN"`),
// wantErr: false,
// },
// {
// name: "0",
// want: &pgtype.Numeric{Valid: true, Int: big.NewInt(0)},
// src: []byte("0"),
// wantErr: false,
// },
// {
// name: "1",
// want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1)},
// src: []byte("1"),
// wantErr: false,
// },
// {
// name: "-1",
// want: &pgtype.Numeric{Valid: true, Int: big.NewInt(-1)},
// src: []byte("-1"),
// wantErr: false,
// },
// {
// name: "bigInt",
// want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1), Exp: 30},
// src: []byte("1000000000000000000000000000000"),
// wantErr: false,
// },
// {
// name: "float: 1234.56789",
// want: &pgtype.Numeric{Valid: true, Int: big.NewInt(123456789), Exp: -5},
// src: []byte("1234.56789"),
// wantErr: false,
// },
{
name: "null",
want: &pgtype.Numeric{},
src: []byte(`null`),
wantErr: false,
},
{
name: "NaN",
want: &pgtype.Numeric{Valid: true, NaN: true},
src: []byte(`"NaN"`),
wantErr: false,
},
{
name: "0",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(0)},
src: []byte("0"),
wantErr: false,
},
{
name: "1",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1)},
src: []byte("1"),
wantErr: false,
},
{
name: "-1",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(-1)},
src: []byte("-1"),
wantErr: false,
},
{
name: "bigInt",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1), Exp: 30},
src: []byte("1000000000000000000000000000000"),
wantErr: false,
},
{
name: "float: 1234.56789",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(123456789), Exp: -5},
src: []byte("1234.56789"),
wantErr: false,
},
{
name: "float: 1e10",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1), Exp: 10},