Skip to content

Commit

Permalink
crypto: replace fmt.Println calls with t.Log in tests (ethereum#19670)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 9, 2024
1 parent 66dd846 commit b9054b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/ecies/ecies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,24 @@ func TestSharedKey(t *testing.T) {

prv2, err := GenerateKey(rand.Reader, DefaultCurve, nil)
if err != nil {
fmt.Println(err.Error())
t.Log(err.Error())
t.FailNow()
}

sk1, err := prv1.GenerateShared(&prv2.PublicKey, skLen, skLen)
if err != nil {
fmt.Println(err.Error())
t.Log(err.Error())
t.FailNow()
}

sk2, err := prv2.GenerateShared(&prv1.PublicKey, skLen, skLen)
if err != nil {
fmt.Println(err.Error())
t.Log(err.Error())
t.FailNow()
}

if !bytes.Equal(sk1, sk2) {
fmt.Println(ErrBadSharedKeys.Error())
t.Log(ErrBadSharedKeys.Error())
t.FailNow()
}
}
Expand Down

0 comments on commit b9054b2

Please sign in to comment.