go/src/log/slog/logger_test.go

const textTimeRE

const jsonTimeRE

func TestLogTextHandler(t *testing.T) {}

func TestConnections(t *testing.T) {}

type wrappingHandler

func (h wrappingHandler) Enabled(ctx context.Context, level Level) bool {}

func (h wrappingHandler) WithGroup(name string) Handler              {}

func (h wrappingHandler) WithAttrs(as []Attr) Handler                {}

func (h wrappingHandler) Handle(ctx context.Context, r Record) error {}

func TestAttrs(t *testing.T) {}

func TestCallDepth(t *testing.T) {}

func TestAlloc(t *testing.T) {}

func TestSetAttrs(t *testing.T) {}

func TestSetDefault(t *testing.T) {}

// Test defaultHandler minimum level without calling slog.SetDefault.
func TestLogLoggerLevelForDefaultHandler(t *testing.T) {}

// Test handlerWriter minimum level by calling slog.SetDefault.
func TestLogLoggerLevelForHandlerWriter(t *testing.T) {}

func TestLoggerError(t *testing.T) {}

func TestNewLogLogger(t *testing.T) {}

func TestLoggerNoOps(t *testing.T) {}

func TestContext(t *testing.T) {}

func checkLogOutput(t *testing.T, got, wantRegexp string) {}

// clean prepares log output for comparison.
func clean(s string) string {}

type captureHandler

func (h *captureHandler) Handle(ctx context.Context, r Record) error {}

func (*captureHandler) Enabled(context.Context, Level) bool {}

func (c *captureHandler) WithAttrs(as []Attr) Handler {}

func (c *captureHandler) WithGroup(name string) Handler {}

func (c *captureHandler) clear() {}

type discardHandler

func (d discardHandler) Enabled(context.Context, Level) bool {}

func (discardHandler) Handle(context.Context, Record) error  {}

func (d discardHandler) WithAttrs(as []Attr) Handler {}

func (h discardHandler) WithGroup(name string) Handler {}

// concat returns a new slice with the elements of s1 followed
// by those of s2. The slice has no additional capacity.
func concat[T any](s1, s2 []T) []T {}

// This is a simple benchmark. See the benchmarks subdirectory for more extensive ones.
func BenchmarkNopLog(b *testing.B) {}

// callerPC returns the program counter at the given stack depth.
func callerPC(depth int) uintptr {}

func wantAllocs(t *testing.T, want int, f func()) {}

type panicTextAndJsonMarshaler

func (p panicTextAndJsonMarshaler) MarshalText() ([]byte, error) {}

func (p panicTextAndJsonMarshaler) MarshalJSON() ([]byte, error) {}

func TestPanics(t *testing.T) {}