replace zxq.co/ripple/hanayo

This commit is contained in:
Alicia
2019-02-23 13:29:15 +00:00
commit c3d206c173
5871 changed files with 1353715 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package cache
import (
"testing"
"time"
)
var newInMemoryStore = func(_ *testing.T, defaultExpiration time.Duration) CacheStore {
return NewInMemoryStore(defaultExpiration)
}
// Test typical cache interactions
func TestInMemoryCache_TypicalGetSet(t *testing.T) {
typicalGetSet(t, newInMemoryStore)
}
func TestInMemoryCache_IncrDecr(t *testing.T) {
incrDecr(t, newInMemoryStore)
}
func TestInMemoryCache_Expiration(t *testing.T) {
expiration(t, newInMemoryStore)
}
func TestInMemoryCache_EmptyCache(t *testing.T) {
emptyCache(t, newInMemoryStore)
}
func TestInMemoryCache_Replace(t *testing.T) {
testReplace(t, newInMemoryStore)
}
func TestInMemoryCache_Add(t *testing.T) {
testAdd(t, newInMemoryStore)
}