MCPcopy
hub / github.com/rs/zerolog / TestClose

Function TestClose

diode/diode_test.go:35–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestClose(t *testing.T) {
36 buf := bytes.Buffer{}
37 w := diode.NewWriter(&buf, 1000, 0, func(missed int) {})
38 log := zerolog.New(w)
39 log.Print("test")
40 w.Close()
41}
42
43func TestFatal(t *testing.T) {
44 if os.Getenv("TEST_FATAL") == "1" {

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
NewWriterFunction · 0.92
NewFunction · 0.92
PrintMethod · 0.80

Tested by

no test coverage detected