MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestNewLevelDBKey

Function TestNewLevelDBKey

utils/bytes_test.go:27–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestNewLevelDBKey(t *testing.T) {
28 Convey("new bytes", t, func() {
29 log.SetLevel(log.DebugLevel)
30 So(ConcatAll(nil), ShouldResemble, []byte{})
31 So(ConcatAll([]byte{}), ShouldResemble, []byte{})
32 So(ConcatAll([]byte{'0'}, []byte{'1'}), ShouldResemble, []byte{'0', '1'})
33 So(ConcatAll([]byte{'0'}, nil), ShouldResemble, []byte{'0'})
34 So(ConcatAll(nil, []byte{'0'}), ShouldResemble, []byte{'0'})
35 So(ConcatAll([]byte{'0', '1', '2', '3'}, []byte{'a', 'b', 'c', 'd', 'e'}, []byte{'x', 'y', 'z'}),
36 ShouldResemble, []byte{'0', '1', '2', '3', 'a', 'b', 'c', 'd', 'e', 'x', 'y', 'z'})
37 So(ConcatAll([]byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}),
38 ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
39 So(ConcatAll([]byte{'0', '1', '2', '3'}, []byte{}, []byte{'x', 'y', 'z'}),
40 ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
41 So(ConcatAll(nil, []byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}),
42 ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
43 So(ConcatAll([]byte{}, []byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}, nil),
44 ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
45 })
46}

Callers

nothing calls this directly

Calls 2

SetLevelFunction · 0.92
ConcatAllFunction · 0.85

Tested by

no test coverage detected