MCPcopy Index your code
hub / github.com/coder/slog / TestSevMapping

Function TestSevMapping

sloggers/slogstackdriver/slogstackdriver_test.go:51–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestSevMapping(t *testing.T) {
52 t.Parallel()
53
54 assert.Equal(t, "level", logpbtype.LogSeverity_DEBUG, slogstackdriver.Sev(slog.LevelDebug))
55 assert.Equal(t, "level", logpbtype.LogSeverity_INFO, slogstackdriver.Sev(slog.LevelInfo))
56 assert.Equal(t, "level", logpbtype.LogSeverity_WARNING, slogstackdriver.Sev(slog.LevelWarn))
57 assert.Equal(t, "level", logpbtype.LogSeverity_ERROR, slogstackdriver.Sev(slog.LevelError))
58 assert.Equal(t, "level", logpbtype.LogSeverity_CRITICAL, slogstackdriver.Sev(slog.LevelCritical))
59}
60
61func TestMain(m *testing.M) {
62 goleak.VerifyTestMain(m)

Callers

nothing calls this directly

Calls 2

EqualFunction · 0.92
SevFunction · 0.92

Tested by

no test coverage detected