From db3a5569cefcf53403d6b5f4b817368335509a45 Mon Sep 17 00:00:00 2001 From: kvii <13721952202@163.com> Date: Fri, 24 Jan 2025 10:42:43 +0800 Subject: [PATCH] test: fix test lint issue --- sm2/sm2_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sm2/sm2_test.go b/sm2/sm2_test.go index ec7a6686..4bb5c92b 100644 --- a/sm2/sm2_test.go +++ b/sm2/sm2_test.go @@ -156,16 +156,16 @@ func TestKEB2(t *testing.T) { if err != nil { t.Error(err) } - if bytes.Compare(k1, k2) != 0 { + if !bytes.Equal(k1, k2) { t.Error("key exchange differ") } - if bytes.Compare(k1, expk) != 0 { + if !bytes.Equal(k1, expk) { t.Errorf("expected %x, found %x", expk, k1) } - if bytes.Compare(S1, Sb) != 0 { + if !bytes.Equal(S1, Sb) { t.Error("hash verfication failed") } - if bytes.Compare(Sa, S2) != 0 { + if !bytes.Equal(Sa, S2) { t.Error("hash verfication failed") } }