MCPcopy
hub / github.com/uber-go/zap / assertEmpty

Function assertEmpty

zaptest/observer/observer_test.go:37–40  ·  view source on GitHub ↗
(t testing.TB, logs *ObservedLogs)

Source from the content-addressed store, hash-verified

35)
36
37func assertEmpty(t testing.TB, logs *ObservedLogs) {
38 assert.Equal(t, 0, logs.Len(), "Expected empty ObservedLogs to have zero length.")
39 assert.Equal(t, []LoggedEntry{}, logs.All(), "Unexpected LoggedEntries in empty ObservedLogs.")
40}
41
42func TestObserver(t *testing.T) {
43 observer, logs := New(zap.InfoLevel)

Callers 1

TestObserverFunction · 0.85

Calls 2

AllMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected