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{
0x5d, 0xd0, 0x51, 0x02, 0x6b, 0xb1, 0x49, 0xa4,
0x52, 0xfd, 0x84, 0xe5, 0xe5, 0x7b, 0x55, 0x00,
}) != 0 {
- t.Fail()
+ t.FailNow()
}
// Second vector
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{
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/
0x9c, 0xee, 0x50, 0xd6, 0x5d, 0xc2, 0x42, 0xf8,
0x2f, 0x23, 0xba, 0x4b, 0x18, 0x0b, 0x18, 0xe0,
}) != 0 {
- t.Fail()
+ t.FailNow()
}
}
0x6f, 0xa8, 0xa1, 0x55, 0xdc, 0xb3, 0xeb, 0x82,
0x2d, 0x92, 0x58, 0x08, 0xf7, 0xc7, 0xe3, 0x45,
}) != 0 {
- t.Fail()
+ t.FailNow()
}
}
// 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()
}
}