OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new repo
[bytom/vapor.git]
/
vendor
/
github.com
/
tendermint
/
tmlibs
/
test
/
assert.go
1
package test
2
3
import (
4
"testing"
5
)
6
7
func AssertPanics(t *testing.T, msg string, f func()) {
8
defer func() {
9
if err := recover(); err == nil {
10
t.Errorf("Should have panic'd, but didn't: %v", msg)
11
}
12
}()
13
f()
14
}