mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 19:21:44 +00:00
First commit
This commit is contained in:
14
test/assert.go
Normal file
14
test/assert.go
Normal file
@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func AssertPanics(t *testing.T, msg string, f func()) {
|
||||
defer func() {
|
||||
if err := recover(); err == nil {
|
||||
t.Errorf("Should have panic'd, but didn't: %v", msg)
|
||||
}
|
||||
}()
|
||||
f()
|
||||
}
|
Reference in New Issue
Block a user