pull out changes into new public function
This commit is contained in:
committed by
Jack Christensen
parent
12582a0fd4
commit
20bf953a17
@@ -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{},
|
||||
|
||||
Reference in New Issue
Block a user