Success implements AssertionHandler.Success.
(ctx *AssertionContext)
| 246 | |
| 247 | // Success implements AssertionHandler.Success. |
| 248 | func (h *DefaultAssertionHandler) Success(ctx *AssertionContext) { |
| 249 | if h.Formatter == nil { |
| 250 | panic("DefaultAssertionHandler.Formatter is nil") |
| 251 | } |
| 252 | |
| 253 | if h.Logger == nil { |
| 254 | return |
| 255 | } |
| 256 | |
| 257 | msg := h.Formatter.FormatSuccess(ctx) |
| 258 | |
| 259 | h.Logger.Logf("%s", msg) |
| 260 | } |
| 261 | |
| 262 | // Failure implements AssertionHandler.Failure. |
| 263 | func (h *DefaultAssertionHandler) Failure( |