mirror of https://github.com/jackc/pgx.git
Fix shopsprint-numeric test
parent
104192725a
commit
b8c043780d
|
@ -22,7 +22,7 @@ func mustParseDecimal(t *testing.T, src string) decimal.Decimal {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNumericNormalize(t *testing.T) {
|
func TestNumericNormalize(t *testing.T) {
|
||||||
testutil.TestSuccessfulNormalize(t, []testutil.NormalizeTest{
|
testutil.TestSuccessfulNormalizeEqFunc(t, []testutil.NormalizeTest{
|
||||||
{
|
{
|
||||||
SQL: "select '0'::numeric",
|
SQL: "select '0'::numeric",
|
||||||
Value: &shopspring.Numeric{Decimal: mustParseDecimal(t, "0"), Status: pgtype.Present},
|
Value: &shopspring.Numeric{Decimal: mustParseDecimal(t, "0"), Status: pgtype.Present},
|
||||||
|
@ -84,6 +84,11 @@ func TestNumericNormalize(t *testing.T) {
|
||||||
Status: pgtype.Present,
|
Status: pgtype.Present,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}, func(aa, bb interface{}) bool {
|
||||||
|
a := aa.(shopspring.Numeric)
|
||||||
|
b := bb.(shopspring.Numeric)
|
||||||
|
|
||||||
|
return a.Status == b.Status && a.Decimal.Equal(b.Decimal)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue