From c0da22ef6f8a9df215ff65677c59e230da7c94c9 Mon Sep 17 00:00:00 2001 From: bandl <1658002533@qq.com> Date: Sun, 28 Nov 2021 19:33:25 +0800 Subject: [PATCH] test(dao-stringx): add test TestDao_GetRange --- storage/dao/stringx_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/dao/stringx_test.go b/storage/dao/stringx_test.go index dab89b8..7cdc5b3 100644 --- a/storage/dao/stringx_test.go +++ b/storage/dao/stringx_test.go @@ -115,6 +115,11 @@ func TestDao_GetRange(t *testing.T) { _, err = dao.GetRange(baseKey, 0, 7) require.Error(t, err) + _, err = dao.Set(baseKey, "123456") + require.NoError(t, err) + resp, err = dao.GetRange(baseKey, 0, 3) + require.NoError(t, err) + require.Equal(t, resp.Result, "123") } func TestDao_GetSet(t *testing.T) {