MCPcopy
hub / github.com/uber-go/zap / assertJSON

Function assertJSON

zapcore/json_encoder_impl_test.go:511–513  ·  view source on GitHub ↗
(t *testing.T, expected string, enc *jsonEncoder)

Source from the content-addressed store, hash-verified

509}
510
511func assertJSON(t *testing.T, expected string, enc *jsonEncoder) {
512 assert.Equal(t, expected, enc.buf.String(), "Encoded JSON didn't match expectations.")
513}
514
515func assertOutput(t testing.TB, cfg EncoderConfig, expected string, f func(Encoder)) {
516 enc := NewJSONEncoder(cfg).(*jsonEncoder)

Callers 2

TestJSONCloneFunction · 0.85
TestJSONEscapingFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected