mirror of
https://github.com/LBRYFoundation/lbcd.git
synced 2025-08-23 17:47:24 +00:00
Test panic for converting invalid sha strings.
ok @davecgh
This commit is contained in:
parent
4bbcede9e0
commit
6d79aa5ff1
1 changed files with 14 additions and 0 deletions
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…
Add table
Reference in a new issue