MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / TestStringFromToByte

Function TestStringFromToByte

cache/redis_cache_test.go:85–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

83 cacheMissHelper(t, c)
84}
85func TestStringFromToByte(t *testing.T) {
86 c := getRedisCache(t)
87 b := c.encodeString("test")
88 s, size, _ := c.decodeString(b)
89 if s != "test" {
90 t.Fatalf("got: %s, expected %s", s, "test")
91 }
92 if size != 8 {
93 t.Fatalf("got: %d, expected %d", size, 8)
94 }
95}
96func TestMetadataFromToByte(t *testing.T) {
97 c := getRedisCache(t)
98

Callers

nothing calls this directly

Calls 3

getRedisCacheFunction · 0.85
encodeStringMethod · 0.80
decodeStringMethod · 0.80

Tested by

no test coverage detected