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

Function writeSequence

zapcore/sampler_test.go:61–68  ·  view source on GitHub ↗
(core Core, n int, lvl Level)

Source from the content-addressed store, hash-verified

59}
60
61func writeSequence(core Core, n int, lvl Level) {
62 // All tests using writeSequence verify that counters are shared between
63 // parent and child cores.
64 core = core.With([]Field{makeInt64Field("iter", n)})
65 if ce := core.Check(Entry{Level: lvl, Time: time.Now()}, nil); ce != nil {
66 ce.Write()
67 }
68}
69
70func TestSampler(t *testing.T) {
71 for _, lvl := range []Level{DebugLevel, InfoLevel, WarnLevel, ErrorLevel, DPanicLevel, PanicLevel, FatalLevel} {

Callers 5

TestSamplerFunction · 0.85
TestSamplerTickingFunction · 0.85
TestSamplerRacesFunction · 0.85
TestSamplerUnknownLevelsFunction · 0.85

Calls 5

makeInt64FieldFunction · 0.85
WithMethod · 0.65
CheckMethod · 0.65
NowMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected