Skip to content

Commit

Permalink
uncomment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yungtrizzle authored and jackc committed Dec 9, 2023
1 parent 9927e14 commit 905f252
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions pgtype/numeric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 905f252

Please sign in to comment.