From 0c5519c4f88a1ca5eebfd653eae1e5fa2c873007 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Sat, 3 Nov 2018 16:45:01 +0800 Subject: [PATCH] add coverage --- binding/binding_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/binding/binding_test.go b/binding/binding_test.go index 262f0c5f..4e10c4c8 100644 --- a/binding/binding_test.go +++ b/binding/binding_test.go @@ -657,6 +657,13 @@ func TestUriBinding(t *testing.T) { m["name"] = []string{"thinkerou"} assert.NoError(t, b.BindUri(m, &tag)) assert.Equal(t, "thinkerou", tag.Name) + + type NotSupportStruct struct { + Name map[string]interface{} `uri:"name"` + } + var not NotSupportStruct + assert.Error(t, b.BindUri(m, ¬)) + assert.Equal(t, "", not.Name) } func testFormBinding(t *testing.T, method, path, badPath, body, badBody string) {