MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestStringStructure_Append

Function TestStringStructure_Append

structure/string_test.go:100–112  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestStringStructure_Append(t *testing.T) {
101 str, _ := initdb()
102 defer str.db.Clean()
103
104 err = str.Set("1", "msg", 0)
105 assert.Nil(t, err)
106
107 err = str.Append("1", "123", 0)
108 assert.Nil(t, err)
109
110 value, _ := str.Get("1")
111 assert.Equal(t, value, "msg123")
112}
113
114func TestStringStructure_Incr(t *testing.T) {
115 str, _ := initdb()

Callers

nothing calls this directly

Calls 5

initdbFunction · 0.85
SetMethod · 0.65
AppendMethod · 0.65
GetMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected