test(lru): update test

This commit is contained in:
HuangJiaLuo 2021-10-04 11:21:55 +08:00
parent 99dd878bb3
commit 29c5aca40d
1 changed files with 3 additions and 2 deletions

View File

@ -1,8 +1,8 @@
package lru package lru
import ( import (
"fmt"
"gitee.com/timedb/wheatCache/pkg/structure/stringx" "gitee.com/timedb/wheatCache/pkg/structure/stringx"
"github.com/stretchr/testify/require"
"testing" "testing"
) )
@ -16,5 +16,6 @@ func TestNewLRUCache(t *testing.T) {
cache.Add("3", v3) cache.Add("3", v3)
cache.Add("1", v1) cache.Add("1", v1)
cache.Del() cache.Del()
fmt.Println(cache.Get("1")) _, isTrue := cache.Get("1")
require.Equal(t, isTrue, true)
} }