Increase test coverage a bit

This commit is contained in:
Victor Quinn 2017-02-15 18:47:03 -05:00
parent de8af6d48f
commit 868a37b979

View file

@ -1226,6 +1226,12 @@ func TestDecimal_Scan(t *testing.T) {
t.Errorf("%s does not equal to %s", a, expected)
}
}
type foo struct{}
err = a.Scan(foo{})
if err == nil {
t.Errorf("a.Scan(Foo{}) should have thrown an error but did not")
}
}
func TestDecimal_Value(t *testing.T) {
@ -1282,6 +1288,11 @@ func TestDecimal_Equal(t *testing.T) {
if !a.Equal(b) {
t.Errorf("%q should equal %q", a, b)
}
// note, this should be deprecated, here for backwards compatibility
if !a.Equals(b) {
t.Errorf("%q should equal %q", a, b)
}
}
func TestDecimal_ScalesNotEqual(t *testing.T) {