Skip to content

Commit

Permalink
crypto: replace t.Log(); t.FailNow() with t.Fatal() (ethereum#19849)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 2, 2024
1 parent 8846268 commit 13eb0f3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crypto/ecies/ecies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,21 @@ func TestSharedKey(t *testing.T) {

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

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

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

if !bytes.Equal(sk1, sk2) {
t.Log(ErrBadSharedKeys.Error())
t.FailNow()
t.Fatal(err)
}
}

Expand Down

0 comments on commit 13eb0f3

Please sign in to comment.