1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00

crypto/sha1: add tests for Size() and BlockSize()

R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/46400044
This commit is contained in:
Shawn Smith 2013-12-31 23:13:05 +11:00 committed by Dave Cheney
parent a1731ac078
commit 0333e80d63

View File

@ -76,6 +76,20 @@ func TestGolden(t *testing.T) {
}
}
func TestSize(t *testing.T) {
c := New()
if got := c.Size(); got != Size {
t.Errorf("Size = %d; want %d", got, Size)
}
}
func TestBlockSize(t *testing.T) {
c := New()
if got := c.BlockSize(); got != BlockSize {
t.Errorf("BlockSize = %d; want %d", got, BlockSize)
}
}
var bench = New()
var buf = make([]byte, 8192)