From: Shawn Smith Date: Tue, 31 Dec 2013 12:13:05 +0000 (+1100) Subject: crypto/sha1: add tests for Size() and BlockSize() X-Git-Tag: go1.3beta1~1082 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0333e80d63afd4cc7595fab589feaf8140154bc7;p=gostls13.git crypto/sha1: add tests for Size() and BlockSize() R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/46400044 --- diff --git a/src/pkg/crypto/sha1/sha1_test.go b/src/pkg/crypto/sha1/sha1_test.go index c3868d702a..6d2a9f24dc 100644 --- a/src/pkg/crypto/sha1/sha1_test.go +++ b/src/pkg/crypto/sha1/sha1_test.go @@ -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)