From 6b0ad1082eaed981dc57393612c467fe3162788e Mon Sep 17 00:00:00 2001 From: thinkerou Date: Mon, 20 Nov 2017 22:57:55 +0800 Subject: [PATCH] add test case for ensureNotPointer --- binding/binding_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/binding/binding_test.go b/binding/binding_test.go index 58c55820..d1c045a6 100644 --- a/binding/binding_test.go +++ b/binding/binding_test.go @@ -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{}{}) }) +}