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

Function TestGetLevel

log_test.go:785–801  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

783}
784
785func TestGetLevel(t *testing.T) {
786 levels := []Level{
787 DebugLevel,
788 InfoLevel,
789 WarnLevel,
790 ErrorLevel,
791 FatalLevel,
792 PanicLevel,
793 NoLevel,
794 Disabled,
795 }
796 for _, level := range levels {
797 if got, want := New(nil).Level(level).GetLevel(), level; got != want {
798 t.Errorf("GetLevel() = %v, want: %v", got, want)
799 }
800 }
801}
802
803func TestSampling(t *testing.T) {
804 out := &bytes.Buffer{}

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
GetLevelMethod · 0.80
LevelMethod · 0.80

Tested by

no test coverage detected