add test case for ensureNotPointer

This commit is contained in:
thinkerou 2017-11-20 22:57:55 +08:00
parent e93bd54a28
commit 6b0ad1082e

View File

@ -984,3 +984,7 @@ func requestWithBody(method, path, body string) (req *http.Request) {
req, _ = http.NewRequest(method, path, bytes.NewBufferString(body))
return
}
func TestEnsureNotPointer(t *testing.T) {
assert.Panics(t, func() { ensureNotPointer(&struct{}{}) })
}