(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestSlogHandler_WithFloat64Attr(t *testing.T) { |
| 133 | var buf bytes.Buffer |
| 134 | logger := newSlogLogger(&buf) |
| 135 | |
| 136 | logger.Info("test", slog.Float64("pi", 3.14)) |
| 137 | |
| 138 | m := decodeJSON(t, &buf) |
| 139 | if m["pi"] != 3.14 { |
| 140 | t.Errorf("expected pi=3.14, got %v", m["pi"]) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func TestSlogHandler_WithTimeAttr(t *testing.T) { |
| 145 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected