(t *testing.T)
| 51 | } |
| 52 | |
| 53 | func TestNewEncoder(t *testing.T) { |
| 54 | testEncoders(func() { |
| 55 | assert.NoError(t, RegisterEncoder("foo", newNilEncoder), "expected to be able to register the encoder foo") |
| 56 | encoder, err := newEncoder("foo", zapcore.EncoderConfig{}) |
| 57 | assert.NoError(t, err, "could not create an encoder for the registered name foo") |
| 58 | assert.Nil(t, encoder, "the encoder from newNilEncoder is not nil") |
| 59 | }) |
| 60 | } |
| 61 | |
| 62 | func TestNewEncoderNotRegistered(t *testing.T) { |
| 63 | _, err := newEncoder("foo", zapcore.EncoderConfig{}) |
nothing calls this directly
no test coverage detected