diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-01-23 22:37:37 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-01-23 22:37:37 +0800 |
commit | 3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e (patch) | |
tree | bebbffe2cbbd78f2bb01805a31685cfbfdaaea70 /crypto/crypto_test.go | |
parent | d5f38f5690caeb30794e62d4a1b2683a6107cfbc (diff) | |
parent | d792e95c214c8352e6b23b798101e90844eaa7a3 (diff) | |
download | dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar.gz dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar.bz2 dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar.lz dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar.xz dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.tar.zst dexon-3aa0410f6ecaa6a44c8e7fa0164cc3209eb6cb8e.zip |
Merge remote-tracking branch 'upstream/develop' into pr/evmjit
Diffstat (limited to 'crypto/crypto_test.go')
-rw-r--r-- | crypto/crypto_test.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 349bc31ae..441733f93 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -52,7 +52,7 @@ func BenchmarkSha3(b *testing.B) { } func Test0Key(t *testing.T) { - + t.Skip() key := ethutil.Hex2Bytes("1111111111111111111111111111111111111111111111111111111111111111") p, err := secp256k1.GeneratePubKey(key) @@ -60,3 +60,15 @@ func Test0Key(t *testing.T) { fmt.Printf("%x\n", p) fmt.Printf("%v %x\n", err, addr) } + +func TestInvalidSign(t *testing.T) { + _, err := Sign(make([]byte, 1), nil) + if err == nil { + t.Errorf("expected sign with hash 1 byte to error") + } + + _, err = Sign(make([]byte, 33), nil) + if err == nil { + t.Errorf("expected sign with hash 33 byte to error") + } +} |