mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-06 21:52:27 +08:00
improve comment ,参考:https://github.com/huacnlee/autocorrect
This commit is contained in:
6
cache/memcache_test.go
vendored
6
cache/memcache_test.go
vendored
@@ -22,12 +22,16 @@ func TestMemcache(t *testing.T) {
|
||||
exists := mem.IsExist("unknown-key")
|
||||
assert.Equal(t, false, exists)
|
||||
|
||||
name := mem.Get("username").(string)
|
||||
name, ok := mem.Get("username").(string)
|
||||
if !ok {
|
||||
t.Error("get Error")
|
||||
}
|
||||
if name != "" {
|
||||
if name != "silenceper" {
|
||||
t.Error("get Error")
|
||||
}
|
||||
}
|
||||
|
||||
data := mem.Get("unknown-key")
|
||||
assert.Nil(t, data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user