diff --git a/pkg/structure/stringx/string_test.go b/pkg/structure/stringx/string_test.go index 978028b..d9e53cb 100644 --- a/pkg/structure/stringx/string_test.go +++ b/pkg/structure/stringx/string_test.go @@ -1,9 +1,10 @@ package stringx import ( + "testing" + "gitee.com/timedb/wheatCache/pkg/structure" "github.com/stretchr/testify/require" - "testing" ) func TestStringSingle_Set(t *testing.T) { @@ -80,3 +81,11 @@ func TestStringSingle_Getbit(t *testing.T) { require.NoError(t, err) require.Equal(t, res, false) } + +func TestStringSingle_Getrange(t *testing.T) { + s := NewStringSingle() + s.Set("abcdefg") + k, err := s.Getrange(0, 3) + require.NoError(t, err) + require.Equal(t, "abc", k) +}