mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-11 18:29:57 +00:00
Test panic for converting invalid sha strings.
ok @davecgh
This commit is contained in:
parent
4bbcede9e0
commit
6d79aa5ff1
14
internal_test.go
Normal file
14
internal_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package btcnet
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInvalidShaStr(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r == nil {
|
||||
t.Errorf("Expected panic for invalid sha string, got nil")
|
||||
}
|
||||
}()
|
||||
newShaHashFromStr("banana")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user