mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 20:40:48 +01:00
Increase test coverage a bit
This commit is contained in:
parent
de8af6d48f
commit
868a37b979
1 changed files with 11 additions and 0 deletions
|
@ -1226,6 +1226,12 @@ func TestDecimal_Scan(t *testing.T) {
|
||||||
t.Errorf("%s does not equal to %s", a, expected)
|
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) {
|
func TestDecimal_Value(t *testing.T) {
|
||||||
|
@ -1282,6 +1288,11 @@ func TestDecimal_Equal(t *testing.T) {
|
||||||
if !a.Equal(b) {
|
if !a.Equal(b) {
|
||||||
t.Errorf("%q should equal %q", a, 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) {
|
func TestDecimal_ScalesNotEqual(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue