MCPcopy Create free account
hub / github.com/chain/Core / TestAddPrefixkv2

Function TestAddPrefixkv2

log/log_test.go:76–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestAddPrefixkv2(t *testing.T) {
77 ctx := context.Background()
78 ctx1 := AddPrefixkv(ctx, "a", "b")
79 ctx2 := AddPrefixkv(ctx1, "c", "d")
80 got := prefix(ctx2)
81 want := []byte("a=b c=d ")
82 if !bytes.Equal(got, want) {
83 t.Errorf(`prefix(AddPrefixkv(AddPrefixkv(bg, "a", "b"), "c", "d")) = %q want %q`, got, want)
84 }
85}
86
87func TestAddPrefixkvAppendTwice(t *testing.T) {
88 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

AddPrefixkvFunction · 0.85
prefixFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected