MCPcopy
hub / github.com/openacid/slim / TestBaseInitWithEncoder

Function TestBaseInitWithEncoder

array/base_test.go:233–245  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

231}
232
233func TestBaseInitWithEncoder(t *testing.T) {
234 ab := &array.Base{}
235 ab.EltEncoder = intEncoder{}
236 err := ab.Init([]int32{1, 2}, []int{3, 4})
237 if err != nil {
238 t.Fatalf("expected no error but: %#v", err)
239 }
240
241 wantelts := []byte{3, 4}
242 if !reflect.DeepEqual(wantelts, ab.Elts) {
243 t.Fatalf("not equal %v", pretty.Diff(wantelts, ab.Elts))
244 }
245}
246
247func TestBase_Get(t *testing.T) {
248

Callers

nothing calls this directly

Calls 1

InitMethod · 0.95

Tested by

no test coverage detected