MCPcopy Create free account
hub / github.com/coder/envbuilder / Test_Verbose

Function Test_Verbose

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

Source from the content-addressed store, hash-verified

9)
10
11func Test_Verbose(t *testing.T) {
12 t.Parallel()
13
14 t.Run("true", func(t *testing.T) {
15 var sb strings.Builder
16 l := log.New(&sb, true)
17 l(log.LevelDebug, "hello")
18 l(log.LevelInfo, "world")
19 require.Equal(t, "hello\nworld\n", sb.String())
20 })
21
22 t.Run("false", func(t *testing.T) {
23 var sb strings.Builder
24 l := log.New(&sb, false)
25 l(log.LevelDebug, "hello")
26 l(log.LevelInfo, "world")
27 require.Equal(t, "world\n", sb.String())
28 })
29}

Callers

nothing calls this directly

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected