This commit is contained in:
2023-02-09 15:06:37 +01:00
parent 26dd16d021
commit c492c80881
2 changed files with 7 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ func init() {
}
func TestResultCache1(t *testing.T) {
cache := NewLRUMap[string](8)
cache := NewLRUMap[string, string](8)
verifyLRUList(cache, t)
key := randomKey()
@@ -50,7 +50,7 @@ func TestResultCache1(t *testing.T) {
}
func TestResultCache2(t *testing.T) {
cache := NewLRUMap[string](8)
cache := NewLRUMap[string, string](8)
verifyLRUList(cache, t)
key1 := "key1"
@@ -150,7 +150,7 @@ func TestResultCache2(t *testing.T) {
}
func TestResultCache3(t *testing.T) {
cache := NewLRUMap[string](8)
cache := NewLRUMap[string, string](8)
verifyLRUList(cache, t)
key1 := "key1"
@@ -173,7 +173,7 @@ func TestResultCache3(t *testing.T) {
}
// does a basic consistency check over the internal cache representation
func verifyLRUList[TData any](cache *LRUMap[TData], t *testing.T) {
func verifyLRUList[TKey comparable, TData any](cache *LRUMap[TKey, TData], t *testing.T) {
size := 0
tailFound := false