Verify more carefully the results in the TestInt64AmountMul

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
This commit is contained in:
Yuki Iwai 2023-10-14 05:12:04 +09:00
parent 4de3e73b8a
commit fb2e28b070

View File

@ -114,10 +114,11 @@ func TestInt64AmountMul(t *testing.T) {
} {
c := test.a
ok := c.Mul(test.b)
if ok != test.ok {
t.Errorf("%v: unexpected ok: %t", test, ok)
}
if ok {
if ok && !test.ok {
t.Errorf("unextected success: %v", c)
} else if !ok && test.ok {
t.Errorf("unexpeted failure: %v", c)
} else if ok {
if c != test.c {
t.Errorf("%v: unexpected result: %d", test, c)
}