Skip to content

Commit

Permalink
hash/crc64: use t.Fatalf in TestGolden
Browse files Browse the repository at this point in the history
Use t.Fatalf instead of t.Errorf followed by t.FailNow.

Change-Id: Ie31f8006e7d9daca7f59bf6f0d5ae688222be486
Reviewed-on: https://go-review.googlesource.com/c/144111
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
tklauser committed Oct 25, 2018
1 parent c659be4 commit 41d6315
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/hash/crc64/crc64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ func TestGolden(t *testing.T) {
io.WriteString(c, g.in)
s := c.Sum64()
if s != g.outISO {
t.Errorf("ISO crc64(%s) = 0x%x want 0x%x", g.in, s, g.outISO)
t.FailNow()
t.Fatalf("ISO crc64(%s) = 0x%x want 0x%x", g.in, s, g.outISO)
}
c = New(tabECMA)
io.WriteString(c, g.in)
s = c.Sum64()
if s != g.outECMA {
t.Errorf("ECMA crc64(%s) = 0x%x want 0x%x", g.in, s, g.outECMA)
t.FailNow()
t.Fatalf("ECMA crc64(%s) = 0x%x want 0x%x", g.in, s, g.outECMA)
}
}
}
Expand Down

0 comments on commit 41d6315

Please sign in to comment.