2
0

pull out changes into new public function

This commit is contained in:
Eshton Robateau
2023-12-04 10:46:00 +08:00
committed by Jack Christensen
parent 12582a0fd4
commit 20bf953a17
2 changed files with 20 additions and 19 deletions
-12
View File
@@ -283,18 +283,6 @@ func TestNumericUnmarshalJSON(t *testing.T) {
src: []byte("1234.56789"),
wantErr: false,
},
{
name: "float: 1e10",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1), Exp: 10},
src: []byte("1e10"),
wantErr: false,
},
{
name: "float: 1.000101231014e10",
want: &pgtype.Numeric{Valid: true, Int: big.NewInt(1000101231014), Exp: -2},
src: []byte("1.000101231014e10"),
wantErr: false,
},
{
name: "invalid value",
want: &pgtype.Numeric{},