- 达达与美团配送的接口修改为较正式参数
This commit is contained in:
@@ -235,3 +235,20 @@ func TestLimitUTF8StringLen(t *testing.T) {
|
||||
t.Log(LimitUTF8StringLen("a大家好1234567", 8))
|
||||
t.Log(LimitMixedStringLen("a大家好1234567", 8))
|
||||
}
|
||||
|
||||
func TestGenerateGetURL(t *testing.T) {
|
||||
fullURL := GenerateGetURL("http://www.163.com", "api", map[string]interface{}{
|
||||
"k1": "v1",
|
||||
"k2": 2,
|
||||
})
|
||||
t.Log(fullURL)
|
||||
if fullURL != "http://www.163.com/api?k1=v1&k2=2" {
|
||||
t.Fatal("GenerateGetURL错误")
|
||||
}
|
||||
|
||||
fullURL = GenerateGetURL("http://www.163.com", "api", nil)
|
||||
t.Log(fullURL)
|
||||
if fullURL != "http://www.163.com/api" {
|
||||
t.Fatal("GenerateGetURL错误")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user