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

Function TestStringStructure_GetSet

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

Source from the content-addressed store, hash-verified

84}
85
86func TestStringStructure_GetSet(t *testing.T) {
87 str, _ := initdb()
88 defer str.db.Clean()
89
90 err = str.Set("1", randkv.RandomValue(100), 0)
91 assert.Nil(t, err)
92 value1, _ := str.Get("1")
93
94 value2, err := str.GetSet("1", randkv.RandomValue(100), 2000)
95 assert.Nil(t, err)
96 assert.NotNil(t, value2)
97 assert.Equal(t, value1, value2)
98}
99
100func TestStringStructure_Append(t *testing.T) {
101 str, _ := initdb()

Callers

nothing calls this directly

Calls 6

RandomValueFunction · 0.92
initdbFunction · 0.85
SetMethod · 0.65
GetMethod · 0.65
GetSetMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected