(t *testing.T)
| 169 | } |
| 170 | |
| 171 | func TestRichErrorSupport(t *testing.T) { |
| 172 | f := Field{ |
| 173 | Type: ErrorType, |
| 174 | Interface: fmt.Errorf("failed: %w", errors.New("egad")), |
| 175 | Key: "k", |
| 176 | } |
| 177 | enc := NewMapObjectEncoder() |
| 178 | f.AddTo(enc) |
| 179 | assert.Equal(t, "failed: egad", enc.Fields["k"], "Unexpected basic error message.") |
| 180 | } |
| 181 | |
| 182 | func TestErrArrayBrokenEncoder(t *testing.T) { |
| 183 | t.Parallel() |
nothing calls this directly
no test coverage detected