MCPcopy
hub / github.com/gofiber/fiber / Test_Warnw

Function Test_Warnw

log/default_test.go:451–463  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

449}
450
451func Test_Warnw(t *testing.T) {
452 initDefaultLogger()
453
454 var w byteSliceWriter
455 SetOutput(&w)
456
457 msg := "warning work"
458 keysAndValues := []any{"key1", "value1", "key2", "value2"}
459
460 Warnw(msg, keysAndValues...)
461
462 require.Equal(t, "[Warn] warning work key1=value1 key2=value2\n", string(w.b))
463}
464
465func Test_Errorw(t *testing.T) {
466 initDefaultLogger()

Callers

nothing calls this directly

Calls 3

initDefaultLoggerFunction · 0.85
SetOutputFunction · 0.85
WarnwFunction · 0.85

Tested by

no test coverage detected