(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestSlogHandler_WithBoolAttr(t *testing.T) { |
| 121 | var buf bytes.Buffer |
| 122 | logger := newSlogLogger(&buf) |
| 123 | |
| 124 | logger.Info("test", slog.Bool("flag", true)) |
| 125 | |
| 126 | m := decodeJSON(t, &buf) |
| 127 | if m["flag"] != true { |
| 128 | t.Errorf("expected flag=true, got %v", m["flag"]) |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func TestSlogHandler_WithFloat64Attr(t *testing.T) { |
| 133 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected