From fb2e28b0702f43af76329caa43459685b3ee5529 Mon Sep 17 00:00:00 2001 From: Yuki Iwai Date: Sat, 14 Oct 2023 05:12:04 +0900 Subject: [PATCH] Verify more carefully the results in the TestInt64AmountMul Signed-off-by: Yuki Iwai --- .../k8s.io/apimachinery/pkg/api/resource/amount_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go b/staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go index 0935016e8db..d31e0b92967 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/resource/amount_test.go @@ -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) }