MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / TestEncodeListKeyAndDecodeListKey

Function TestEncodeListKeyAndDecodeListKey

internal/utils/utils_test.go:50–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestEncodeListKeyAndDecodeListKey(t *testing.T) {
51 key := []byte("test_key")
52 seq := uint64(114514)
53 dataKey := utils.EncodeListKey(key, seq)
54 newKey, newSeq := utils.DecodeListKey(dataKey)
55 assert.Equal(t, key, newKey)
56 assert.Equal(t, seq, newSeq)
57}
58
59func TestFnvHash32(t *testing.T) {
60 t.Run("test hash32", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

EncodeListKeyFunction · 0.92
DecodeListKeyFunction · 0.92

Tested by

no test coverage detected