fix tests

This commit is contained in:
Jae Kwon
2014-10-11 21:27:58 -07:00
parent 02d1e7853e
commit 7652c5d0de
15 changed files with 239 additions and 200 deletions

View File

@ -15,14 +15,14 @@ func TestSignAndValidate(t *testing.T) {
t.Logf("msg: %X, sig: %X", msg, sig)
// Test the signature
if !account.Verify(msg, sig) {
if !account.VerifyBytes(msg, sig) {
t.Errorf("Account message signature verification failed")
}
// Mutate the signature, just one bit.
sig.Bytes[0] ^= byte(0x01)
if account.Verify(msg, sig) {
if account.VerifyBytes(msg, sig) {
t.Errorf("Account message signature verification should have failed but passed instead")
}
}