MCPcopy Create free account
hub / github.com/chain/txvm / TestRawStack

Function TestRawStack

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

Source from the content-addressed store, hash-verified

269}
270
271func TestRawStack(t *testing.T) {
272 var buf bytes.Buffer
273 SetOutput(&buf)
274 defer SetOutput(os.Stdout)
275
276 stack := []byte("this\nis\na\nraw\nstack")
277 Printkv(context.Background(), "message", "foo", "stack", stack)
278
279 got := buf.String()
280 if !strings.HasSuffix(got, "\n"+string(stack)+"\n") {
281 t.Logf("output:\n%s", got)
282 t.Errorf("output did not contain %q", stack)
283 }
284}
285
286func TestHelperStack(t *testing.T) {
287 buf := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 3

SetOutputFunction · 0.85
PrintkvFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected