MCPcopy Create free account
hub / github.com/apache/dubbo-go / TestURLGetParamIntValue

Function TestURLGetParamIntValue

common/url_test.go:227–240  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

225}
226
227func TestURLGetParamIntValue(t *testing.T) {
228 params := url.Values{}
229 params.Set("key", "0")
230
231 u := URL{}
232 u.SetParams(params)
233
234 v := u.GetParamInt("key", 1)
235 assert.Equal(t, int64(0), v)
236
237 u = URL{}
238 v = u.GetParamInt("key", 1)
239 assert.Equal(t, int64(1), v)
240}
241
242func TestURLGetParamBool(t *testing.T) {
243 params := url.Values{}

Callers

nothing calls this directly

Calls 4

SetParamsMethod · 0.95
GetParamIntMethod · 0.95
SetMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected