X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgogost%2Finternal%2Fgost34112012%2Fhash_test.go;h=b9422b7105ea96b5e9e804668a17a9530e4c506b;hb=1f35967fa918c1653dfa787818ce4f3559283ff5;hp=903e60fa17a652f8891c92221e8fed6720c9b64d;hpb=69e668f3499122e0b1140f3bd927de41ad279b94;p=gogost.git diff --git a/src/cypherpunks.ru/gogost/internal/gost34112012/hash_test.go b/src/cypherpunks.ru/gogost/internal/gost34112012/hash_test.go index 903e60f..b9422b7 100644 --- a/src/cypherpunks.ru/gogost/internal/gost34112012/hash_test.go +++ b/src/cypherpunks.ru/gogost/internal/gost34112012/hash_test.go @@ -55,7 +55,7 @@ func TestVectors(t *testing.T) { 0xe2, 0xa4, 0x81, 0x33, 0x2b, 0x08, 0xef, 0x7f, 0x41, 0x79, 0x78, 0x91, 0xc1, 0x64, 0x6f, 0x48, }) != 0 { - t.Fail() + t.FailNow() } h256.Write(m) if bytes.Compare(h256.Sum(nil), []byte{ @@ -64,7 +64,7 @@ func TestVectors(t *testing.T) { 0x5d, 0xd0, 0x51, 0x02, 0x6b, 0xb1, 0x49, 0xa4, 0x52, 0xfd, 0x84, 0xe5, 0xe5, 0x7b, 0x55, 0x00, }) != 0 { - t.Fail() + t.FailNow() } // Second vector @@ -94,7 +94,7 @@ func TestVectors(t *testing.T) { 0x3f, 0x0c, 0xb9, 0xdd, 0xdc, 0x2b, 0x64, 0x60, 0x14, 0x3b, 0x03, 0xda, 0xba, 0xc9, 0xfb, 0x28, }) != 0 { - t.Fail() + t.FailNow() } h256.Write(m) if bytes.Compare(h256.Sum(nil), []byte{ @@ -103,7 +103,7 @@ func TestVectors(t *testing.T) { 0xc0, 0xca, 0xc6, 0x28, 0xfc, 0x66, 0x9a, 0x74, 0x1d, 0x50, 0x06, 0x3c, 0x55, 0x7e, 0x8f, 0x50, }) != 0 { - t.Fail() + t.FailNow() } // Test vector from https://habr.com/ru/post/450024/ @@ -135,7 +135,7 @@ func TestVectors(t *testing.T) { 0x9c, 0xee, 0x50, 0xd6, 0x5d, 0xc2, 0x42, 0xf8, 0x2f, 0x23, 0xba, 0x4b, 0x18, 0x0b, 0x18, 0xe0, }) != 0 { - t.Fail() + t.FailNow() } } @@ -156,7 +156,7 @@ func TestBlocksized(t *testing.T) { 0x6f, 0xa8, 0xa1, 0x55, 0xdc, 0xb3, 0xeb, 0x82, 0x2d, 0x92, 0x58, 0x08, 0xf7, 0xc7, 0xe3, 0x45, }) != 0 { - t.Fail() + t.FailNow() } } @@ -165,17 +165,17 @@ func TestBehaviour(t *testing.T) { // Sum does not change the state hsh1 := h.Sum(nil) if bytes.Compare(h.Sum(nil), hsh1) != 0 { - t.Fail() + t.FailNow() } // No data equals to no state changing h.Write([]byte{}) if bytes.Compare(h.Sum(nil), hsh1) != 0 { - t.Fail() + t.FailNow() } // Just to be sure h.Write([]byte{}) if bytes.Compare(h.Sum(nil), hsh1) != 0 { - t.Fail() + t.FailNow() } }