Fix shopsprint-numeric test

batch-wip
Jack Christensen 2017-05-20 09:46:06 -05:00
parent 104192725a
commit b8c043780d
1 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@ func mustParseDecimal(t *testing.T, src string) decimal.Decimal {
}
func TestNumericNormalize(t *testing.T) {
testutil.TestSuccessfulNormalize(t, []testutil.NormalizeTest{
testutil.TestSuccessfulNormalizeEqFunc(t, []testutil.NormalizeTest{
{
SQL: "select '0'::numeric",
Value: &shopspring.Numeric{Decimal: mustParseDecimal(t, "0"), Status: pgtype.Present},
@ -84,6 +84,11 @@ func TestNumericNormalize(t *testing.T) {
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)
})
}