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:
parent
a1731ac078
commit
0333e80d63
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user